📄 page.cpp
字号:
// Page.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "Page.h"
#include "PageDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CPageApp
BEGIN_MESSAGE_MAP(CPageApp, CWinApp)
//{{AFX_MSG_MAP(CPageApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPageApp construction
CPageApp::CPageApp()
{
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CPageApp object
CPageApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CPageApp initialization
BOOL CPageApp::InitInstance()
{
::CreateMutex(NULL,TRUE, m_pszAppName);
if(GetLastError()==ERROR_ALREADY_EXISTS) //判断CreateMutex()的错误信息
{
::MessageBox(NULL,"程序已经启动了!","闹钟",MB_ICONINFORMATION);
return FALSE;
}
pSplashThread =(CSplashThread*)AfxBeginThread(RUNTIME_CLASS(CSplashThread),0,0,0);
this->SetDialogBkColor(RGB(216,225,252));
AfxGetApp()->m_pszProfileName=".\\Settings.ini";
AfxEnableControlContainer(); //如果不加该函数,则控件不能正常使用
#ifdef _AFXDLL
Enable3dControls(); //Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
CPageDlg dlg;
m_pMainWnd = &dlg;
dlg.DoModal(); //显示主对话框
return FALSE;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -