请问下高手,这个基于对话框的程序里,m_pMainWnd这个成员变量是哪里来的,我在其生成的文件里没找到,是不是从CWinApp继承来的,我查了基类也没有这个成员,还有一个问题,这个
void CTesDlg::OnPaint() 在程序里的是什么时调用的,是不是在重绘时调用,不过我在那设了个断点,窗口切换时也没有调用,望指教!先在此谢过!
BOOL CTesApp::InitInstance()
{
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
CTesDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
}