📄 subclassdialog.cpp
字号:
// SubClassDialog.cpp : implementation file
//
#include "stdafx.h"
#include "SubClass.h"
#include "SubClassDialog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSubClassDialog dialog
CSubClassDialog::CSubClassDialog(CWnd* pParent /*=NULL*/)
: CDialog(CSubClassDialog::IDD, pParent)
{
//{{AFX_DATA_INIT(CSubClassDialog)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CSubClassDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSubClassDialog)
DDX_Control(pDX, IDC_EDIT, m_Edit);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CSubClassDialog, CDialog)
//{{AFX_MSG_MAP(CSubClassDialog)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSubClassDialog message handlers
BOOL CSubClassDialog::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
HWND hWnd;
GetDlgItem(IDC_EDIT2, &hWnd);
m_Edit2.SubclassWindow(hWnd);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
BOOL CSubClassDialog::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
return CDialog::PreTranslateMessage(pMsg);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -