summaryrefslogtreecommitdiffabout
path: root/klog.cpp
Unidiff
Diffstat (limited to 'klog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--klog.cpp70
1 files changed, 70 insertions, 0 deletions
diff --git a/klog.cpp b/klog.cpp
new file mode 100644
index 0000000..1f6861d
--- a/dev/null
+++ b/klog.cpp
@@ -0,0 +1,70 @@
1// KLog.cpp : Defines the class behaviors for the application.
2//
3
4#include "stdafx.h"
5#include "KLog.h"
6#include "SyslogSocket.h"
7#include "KLogDlg.h"
8
9#ifdef _DEBUG
10#define new DEBUG_NEW
11#undef THIS_FILE
12static char THIS_FILE[] = __FILE__;
13#endif
14
15/////////////////////////////////////////////////////////////////////////////
16// CKLogApp
17
18BEGIN_MESSAGE_MAP(CKLogApp, CWinApp)
19 //{{AFX_MSG_MAP(CKLogApp)
20 //}}AFX_MSG
21 ON_COMMAND(ID_HELP, CWinApp::OnHelp)
22END_MESSAGE_MAP()
23
24/////////////////////////////////////////////////////////////////////////////
25// CKLogApp construction
26
27CKLogApp::CKLogApp()
28{
29}
30
31/////////////////////////////////////////////////////////////////////////////
32// The one and only CKLogApp object
33
34CKLogApp theApp;
35
36/////////////////////////////////////////////////////////////////////////////
37// CKLogApp initialization
38
39BOOL CKLogApp::InitInstance()
40{
41 if (!AfxSocketInit())
42 {
43 AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
44 return FALSE;
45 }
46
47 // Standard initialization
48 // If you are not using these features and wish to reduce the size
49 // of your final executable, you should remove from the following
50 // the specific initialization routines you do not need.
51
52#ifdef _AFXDLL
53 Enable3dControls(); // Call this when using MFC in a shared DLL
54#else
55 Enable3dControlsStatic();// Call this when linking to MFC statically
56#endif
57
58 SetRegistryKey(IDS_REGISTRYKEY);
59 m_HelpFile = m_pszHelpFilePath;
60 m_HelpFile+=">Standard";
61 m_pszHelpFilePath=(LPCTSTR)m_HelpFile;
62
63 CKLogDlg dlg;
64 m_pMainWnd = &dlg;
65 int nResponse = dlg.DoModal();
66
67 // Since the dialog has been closed, return FALSE so that we exit the
68 // application, rather than start the application's message pump.
69 return FALSE;
70}