[求助]关于Custom Control的使用,奇怪的现象~~~
雨中的月儿 2006-08-08 12:35:07 单文档SDI,继承CFormView类.
在dialog上添加Custom Control,定义属性为IDC_GRID,MFCGridCtrl(下载源代码).
在CXXView中,添加成员变量CGridCtrl m_GridCtrl.将此变量与刚才的IDC_GRID控件关联起来.
m_GridCtrl.Create(clientRect, this, IDC_GRID);
....
m_GridCtrl.ShowWindow(TRUE);
编译通过,运行正常.
然后,删除掉IDC_GRID控件,将
m_GridCtrl.Create(clientRect, this, IDC_GRID);
修改为
m_GridCtrl.Create(clientRect, this, 1003);
编译通过,仍然可以运行.
就纳闷了,难道m_GridCtrl不需要与Custom Control关联的么?
还请高手指点.
困扰多时了~~~~