dialogb.cpp

来自「MFC DLL的编写和调用示例」· C++ 代码 · 共 67 行

CPP
67
字号
// DialogB.cpp : implementation file
//

#include "stdafx.h"
#include "DialogB.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CDialogB dialog


CDialogB::CDialogB(CWnd* pParent /*=NULL*/)
	: CDialog(CDialogB::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDialogB)
	m_sText = _T("");
	//}}AFX_DATA_INIT
}


void CDialogB::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDialogB)
	DDX_Text(pDX, IDC_EDIT1, m_sText);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDialogB, CDialog)
	//{{AFX_MSG_MAP(CDialogB)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDialogB message handlers

int CDialogB::DoModal() 
{
//	Putting this code here will cause an Assert in the CWnd::AssertValid()
#ifdef B_IS_REGULAR
//	AFX_MANAGE_STATE(AfxGetStaticModuleState());
#endif
	return CDialog::DoModal();
}

BOOL CDialogB::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CDialogB::OnOK() 
{
	UpdateData();
	CDialog::OnOK();
}

⌨️ 快捷键说明

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