123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- #include "stdafx.h"
- #include "ReadSensor.h"
- #include "ReadSensorDlg.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #endif
- BEGIN_MESSAGE_MAP(CReadSensorApp, CWinApp)
- ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
- END_MESSAGE_MAP()
- CReadSensorApp::CReadSensorApp()
- {
-
- m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART;
-
-
- }
- CReadSensorApp theApp;
- BOOL CReadSensorApp::InitInstance()
- {
-
-
-
- INITCOMMONCONTROLSEX InitCtrls;
- InitCtrls.dwSize = sizeof(InitCtrls);
-
-
- InitCtrls.dwICC = ICC_WIN95_CLASSES;
- InitCommonControlsEx(&InitCtrls);
- AfxInitRichEdit();
- AfxInitRichEdit2();
- CWinApp::InitInstance();
- AfxEnableControlContainer();
-
-
- CShellManager *pShellManager = new CShellManager;
-
- CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows));
-
-
-
-
-
-
-
- SetRegistryKey(_T("Local AppWizard-Generated Applications"));
- CReadSensorDlg dlg;
- m_pMainWnd = &dlg;
- INT_PTR nResponse = dlg.DoModal();
- if (nResponse == IDOK)
- {
-
-
- }
- else if (nResponse == IDCANCEL)
- {
-
-
- }
- else if (nResponse == -1)
- {
- TRACE(traceAppMsg, 0, "Warning: dialog creation failed, so application is terminating unexpectedly.\n");
- TRACE(traceAppMsg, 0, "Warning: if you are using MFC controls on the dialog, you cannot #define _AFX_NO_MFC_CONTROLS_IN_DIALOGS.\n");
- }
-
- if (pShellManager != NULL)
- {
- delete pShellManager;
- }
-
-
- return FALSE;
- }
|