1. Start a dialog based MFC Application
2. Add a class inherit from CView ( Here I add a class named CDictView inherit from CHtmlView)
3. Add following code in OnInitDialogDone!
CCreateContext ctx1;
ctx1.m_pCurrentDoc = NULL;
ctx1.m_pCurrentFrame = NULL;
ctx1.m_pLastView = NULL;
ctx1.m_pNewDocTemplate = NULL;
ctx1.m_pNewViewClass = RUNTIME_CLASS(CDictView); 
CDictView* dictView = NULL;
dictView = (CDictView*)((CFrameWnd *)this)->CreateView(&ctx1);
CRect rectClient;
//GetDlgItem(IDC_STATIC1)->GetClientRect(rectClient);
//GetDlgItem(IDC_STATIC1)->MapWindowPoints(this, rectClient);
//rectClient.DeflateRect(0,0);
GetClientRect(&rectClient);
dictView->MoveWindow(rectClient);
dictView->UpdateWindow();
Pass the compilation on VS 2008.
472




被折叠的 条评论
为什么被折叠?



