⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dialogs.cpp

📁 《Visual C++ Bible》或者说是《Visual C++ 宝典》的对应的源码文件
💻 CPP
字号:
// dialogs.cpp : Defines the class behaviors for the application.
//

#include "stdafx.h"
#include "dialogs.h"

#include "progress.h"
#include "extendlg.h"
#include "mainfrm.h"

#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// DApp

BEGIN_MESSAGE_MAP(DApp, CWinApp)
	//{{AFX_MSG_MAP(DApp)
	ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
		// NOTE - the ClassWizard will add and remove mapping macros here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	//}}AFX_MSG_MAP
	// Standard file based document commands
	ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
	ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// DApp construction

DApp::DApp()
{
	// TODO: add construction code here,
	// Place all significant initialization in InitInstance
}

/////////////////////////////////////////////////////////////////////////////
// The one and only DApp object

DApp theApp;

/////////////////////////////////////////////////////////////////////////////
// DApp initialization

BOOL DApp::InitInstance()
{
    // Turn on support for 3-dimensional dialog box controls.
	Enable3dControls();

    // Set control text and control background colors.
    SetDialogBkColor(RGB(192, 192, 192), RGB(0, 0, 0) );

    // Step 1: Allocate C++ window object.
    DMainFrame * pFrame;
	pFrame = new DMainFrame();

    // Step 2: Initialize window object.
	pFrame->LoadFrame(IDR_MAINFRAME);

    // Make window visible
	pFrame->ShowWindow(m_nCmdShow);

    // Assign frame as application's main window
	m_pMainWnd = pFrame;

	return TRUE;
}

/////////////////////////////////////////////////////////////////////////////
// DApp commands

// App command to run the dialog
void DApp::OnAppAbout()
{
    CDialog aboutDlg(IDD_ABOUTBOX);
	aboutDlg.DoModal();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -