我在非主对话框的OnInitDialog()增加视图的代码如下:
CCreateContext pContext;
CWnd* pFrameWnd = this;
pContext.m_pCurrentDoc = new CMyDocument;
pContext.m_pNewViewClass = RUNTIME_CLASS(CMyVw1);
CMyVw1 *pView =(CMyVw1 *) ((CFrameWnd*)pFrameWnd)->CreateView(&pContext);
ASSERT(pView);
pView->ShowWindow(SW_NORMAL);
CRect rectWindow;
rectWindow.left += 20;
rectWindow.right -= 15;
rectWindow.top += 10;
rectWindow.bottom -= 50;
pView->MoveWindow(rectWindow);但是在对话框中却没有显示出来,请问怎么回事?谢谢