关于GetDlgItem的一个问题 急
我在书上和一些贴子上看见类似这样的代码:
((CComboBox*)GetDlgItem(IDC_COMBO1))->AddString(TEXT("上海"));
(GetDlgItem(IDC_BUTTON1))->SetWindowText(_T("123"));
我是在CDialog派生类的构造函数里面调用的
为什么在其他地方可以呢?
两种都出现这样的情况
可是为什么我这样用就不行呢?
错误代码如下:
For information on how your program can cause an assertion
failure, see the Visual C++ document on asserts .