Programming 版 (精华区)
发信人: compus (蓝天), 信区: programming
标 题: Subcalss a control using MFC
发信站: 紫 丁 香 (Sun Aug 10 12:44:37 1997)
Read the documentation on SubClassDlgItem. Here's an example of how to
call it:
BOOL CMyDialog::OnInitDialog()
{
//Do your subclassing first.
m_MyControl.SubClassDlgItem(ID_MYCONTROL, this);
//Let the base class do its thing.
CDialog::OnInitDialog();
// Perhaps do some more stuff
// Be sure to call Ctl3d last, or it will cause
// assertions from multiple subclassing.
Ctl3dSubclassDlg(m_hWnd, CTL3D_ALL);
}
--
********天若有情天亦老,人间正道是沧桑*******
※ 来源:.紫 丁 香 pclinux.[FROM: 202.118.235.6]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:3.416毫秒