在对话框的 OnInitDialog() 函数后加入如下代码即可: CCreateContext pContext; CWnd* pFrameWnd = this; pContext.m_pCurrentDoc = new CDocument; pContext.m_pNewViewClass = RUNTIME_CLASS(CHtmlView); CHtmlView *pView =(CHtmlView*)((CFrameWnd*)pFrameWnd)->CreateView(&pContext); ASSERT(pView); pView->ShowWindow(SW_NORMAL); CRect rectWindow; GetWindowRect(rectWindow); rectWindow.right-=5; rectWindow.bottom-=15; pView->MoveWindow(rectWindow); pView->Navigate(_T("www.baidu.com"));