为何得到窗口指针为0,代码是。。。
void HelpView::OnSize(UINT nType, int cx, int cy)
{
CFormView::OnSize(nType, cx, cy);
CWnd *pwnd;
CRect myRect;
pwnd=(CWnd *)GetDlgItem(IDD_DIALOG1);
if(pwnd != NULL)
{
pwnd->GetWindowRect(myRect);
ClientToScreen(myRect);
MoveWindow(myRect.left, myRect.top,myRect.Width(), myRect.Height());
m_tab.MoveWindow(&myRect,TRUE);
}
else
{
return;
}
}