Annotation of DewFind/DewFind.cpp, revision 1.1
1.1 ! nick 1: // DewFind.cpp : Defines the class behaviors for the application.
! 2: //
! 3:
! 4: #include "stdafx.h"
! 5: #include "DewFind.h"
! 6: #include "LogFile.h"
! 7: #include "DewFindDlg.h"
! 8:
! 9: #ifdef _DEBUG
! 10: #define new DEBUG_NEW
! 11: #endif
! 12:
! 13: LogFile LF;
! 14: // CDewFindApp
! 15:
! 16: BEGIN_MESSAGE_MAP(CDewFindApp, CWinApp)
! 17: ON_COMMAND(ID_HELP, CWinApp::OnHelp)
! 18: END_MESSAGE_MAP()
! 19:
! 20:
! 21: // CDewFindApp construction
! 22:
! 23: CDewFindApp::CDewFindApp()
! 24: {
! 25: // TODO: add construction code here,
! 26: // Place all significant initialization in InitInstance
! 27: }
! 28:
! 29:
! 30: // The one and only CDewFindApp object
! 31:
! 32: CDewFindApp theApp;
! 33:
! 34:
! 35: // CDewFindApp initialization
! 36:
! 37: BOOL CDewFindApp::InitInstance()
! 38: {
! 39: // InitCommonControls() is required on Windows XP if an application
! 40: // manifest specifies use of ComCtl32.dll version 6 or later to enable
! 41: // visual styles. Otherwise, any window creation will fail.
! 42: InitCommonControls();
! 43:
! 44: CWinApp::InitInstance();
! 45:
! 46: AfxEnableControlContainer();
! 47:
! 48: // Standard initialization
! 49: // If you are not using these features and wish to reduce the size
! 50: // of your final executable, you should remove from the following
! 51: // the specific initialization routines you do not need
! 52: // Change the registry key under which our settings are stored
! 53: // TODO: You should modify this string to be something appropriate
! 54: // such as the name of your company or organization
! 55: SetRegistryKey(_T("Local AppWizard-Generated Applications"));
! 56:
! 57: CDewFindDlg dlg;
! 58: m_pMainWnd = &dlg;
! 59:
! 60: LF.ToggleStatus(true);
! 61: LF.Init("DewFindLog.rtf");
! 62: LF.LogString("[B]DewFind[/B]");
! 63:
! 64: INT_PTR nResponse = dlg.DoModal();
! 65: if (nResponse == IDOK)
! 66: {
! 67: LF.LogString("Closed with Ok");
! 68: }
! 69: else if (nResponse == IDCANCEL)
! 70: {
! 71: LF.LogString("Closed with Cancel");
! 72: }
! 73:
! 74: LF.Close();
! 75:
! 76: // Since the dialog has been closed, return FALSE so that we exit the
! 77: // application, rather than start the application's message pump.
! 78: return FALSE;
! 79: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>