📄 user.cpp
字号:
// User.cpp : Defines the class behaviors
// for the application.
//
#include "stdafx.h"
#include "User.h"
#include "UserDlg.h"
#include "dispatch.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
//////////////////////////////////////
// CUserApp
BEGIN_MESSAGE_MAP(CUserApp, CWinApp)
//{{AFX_MSG_MAP(CUserApp)
//}}AFX_MSG
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()
//////////////////////////////////////
// CUserApp construction
CUserApp::CUserApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}
//////////////////////////////////////
// The one and only CUserApp object
CUserApp theApp;
//////////////////////////////////////
// CUserApp initialization
BOOL CUserApp::InitInstance()
{
// Initialize OLE libraries
if (!AfxOleInit())
{
AfxMessageBox(IDP_OLE_INIT_FAILED);
return FALSE;
}
#ifdef _AFXDLL
Enable3dControls();
#else
Enable3dControlsStatic();
#endif
// Parse the command line
if (RunEmbedded() || RunAutomated())
{
COleTemplateServer::RegisterAll();
return TRUE;
}
COleObjectFactory::UpdateRegistryAll();
CUserDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
IDispatcher disp;
disp.CreateDispatch("Beeper"); // ProgID
disp.Beep();
}
else if (nResponse == IDCANCEL)
{
// No action
}
return FALSE;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -