namedlg.cpp
来自「由吕军等人著的《Visual C++ 与面向对象程序设计教程》课后习题的源代码」· C++ 代码 · 共 60 行
CPP
60 行
// NameDlg.cpp : implementation file
//
#include "stdafx.h"
#include "My.h"
#include "NameDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CNameDlg dialog
CNameDlg::CNameDlg(CWnd* pParent /*=NULL*/)
: CDialog(CNameDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CNameDlg)
m_strNameEdit = _T("");
//}}AFX_DATA_INIT
}
void CNameDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CNameDlg)
DDX_Text(pDX, IDC_EDITNAME, m_strNameEdit);
DDV_MaxChars(pDX, m_strNameEdit, 20);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CNameDlg, CDialog)
//{{AFX_MSG_MAP(CNameDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CNameDlg message handlers
BOOL CNameDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
CRect rect;
GetWindowRect(&rect);
rect = CRect(m_pointTopLeft, rect.Size());
MoveWindow(rect);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?