-
Notifications
You must be signed in to change notification settings - Fork 9
/
CDM.cpp
61 lines (47 loc) · 1.42 KB
/
CDM.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// Hermit2.cpp: Defines the class behaviors for the application.
#include "stdafx.h"
#include "CDM.h"
#include "CDMDlg.h"
#include "Setting.h"
#include "ThemeController.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CHermit2App
BEGIN_MESSAGE_MAP(CCDMApp, CWinApp)
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()
// CHermit2App construction
CCDMApp::CCDMApp()
{
// TODO: Please add the code for building in this position.
// Please describe all the initialization process in the InitInstance important here.
}
// This is CHermit2App object.
CCDMApp theApp;
CSetting theSetting;
CThemeController theTheme;
// Initialize CHermit2App
BOOL CCDMApp::InitInstance()
{
// For the application manifest to enable visual styles,
// If you want to specify the use of version 6 or later ComCtl32.dll,
// You must have () InitCommonControls to Windows XP. Otherwise, any window creation will fail.
theSetting.Load();
InitCommonControls();
CWinApp::InitInstance();
CCDMDlg dlg;
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: the code is erased when the dialog is <OK>
}
else if (nResponse == IDCANCEL)
{
// TODO: the code when the dialog is dismissed with <Cancel>
}
// Dialog has been closed. Do not start the application's message pump
// Please return FALSE to exit the application.
return FALSE;
}