-
Notifications
You must be signed in to change notification settings - Fork 52
/
FontMakerApp.cpp
72 lines (60 loc) · 1.19 KB
/
FontMakerApp.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
62
63
64
65
66
67
68
69
70
71
72
// FontMaker.cpp : 定义应用程序的类行为。
//
#include "stdafx.h"
#include "FontMakerApp.h"
#include "FontMakerDlg.h"
#include "AboutBox.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CFontMakerApp
BEGIN_MESSAGE_MAP(CFontMakerApp, CWinApp)
ON_COMMAND(ID_HELP, OnHelp)
END_MESSAGE_MAP()
// CFontMakerApp 构造
CFontMakerApp::CFontMakerApp()
{
bHelp=TRUE;
}
// 唯一的一个 CFontMakerApp 对象
CFontMakerApp theApp;
BOOL CFontMakerApp::InitApplication()
{
INITCOMMONCONTROLSEX InitCtrls;
InitCtrls.dwSize = sizeof(InitCtrls);
InitCtrls.dwICC = ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);
return TRUE;
}
// CFontMakerApp 初始化
BOOL CFontMakerApp::InitInstance()
{
CWinApp::InitInstance();
CFontMakerDlg dlg;
m_pMainWnd = &dlg;
dlg.DoModal();
return FALSE;
}
BOOL CFontMakerApp::GetPath(CString& path)
{
int len;
CString str;
WCHAR* temp;
temp= _wcsdup(m_pszHelpFilePath);
str = m_pszHelpFilePath;
len = str.ReverseFind(L'\\');
temp[len+1] = L'\0';
path = temp;
free(temp);
return TRUE;
}
void CFontMakerApp::OnHelp()
{
CAboutBox abox;
if(bHelp==TRUE)
{
bHelp=FALSE;
abox.DoModal();
bHelp=TRUE;
}
}