author | Michael Krelin <hacker@klever.net> | 2004-07-05 01:53:09 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2004-07-05 01:53:09 (UTC) |
commit | a1487b3fc0313408525cd5b2f3bc4a462df351f7 (patch) (unidiff) | |
tree | 010aec6c2abd5ada2f909ac6798c93bf22508bf5 /klog.cpp | |
download | klog-a1487b3fc0313408525cd5b2f3bc4a462df351f7.zip klog-a1487b3fc0313408525cd5b2f3bc4a462df351f7.tar.gz klog-a1487b3fc0313408525cd5b2f3bc4a462df351f7.tar.bz2 |
initial commit into svn repository
git-svn-id: http://svn.klever.net/kin/klog/trunk@1 fe716a7a-6dde-0310-88d9-d003556173a8
-rw-r--r-- | klog.cpp | 70 |
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 | ||
12 | static char THIS_FILE[] = __FILE__; | ||
13 | #endif | ||
14 | |||
15 | ///////////////////////////////////////////////////////////////////////////// | ||
16 | // CKLogApp | ||
17 | |||
18 | BEGIN_MESSAGE_MAP(CKLogApp, CWinApp) | ||
19 | //{{AFX_MSG_MAP(CKLogApp) | ||
20 | //}}AFX_MSG | ||
21 | ON_COMMAND(ID_HELP, CWinApp::OnHelp) | ||
22 | END_MESSAGE_MAP() | ||
23 | |||
24 | ///////////////////////////////////////////////////////////////////////////// | ||
25 | // CKLogApp construction | ||
26 | |||
27 | CKLogApp::CKLogApp() | ||
28 | { | ||
29 | } | ||
30 | |||
31 | ///////////////////////////////////////////////////////////////////////////// | ||
32 | // The one and only CKLogApp object | ||
33 | |||
34 | CKLogApp theApp; | ||
35 | |||
36 | ///////////////////////////////////////////////////////////////////////////// | ||
37 | // CKLogApp initialization | ||
38 | |||
39 | BOOL 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 | } | ||