请高手指点怎么修改
CCreateContext pContext;
CWnd* pFrameWnd = this;
pContext.m_pCurrentDoc = new CDocument;
pContext.m_pNewViewClass = RUNTIME_CLASS(CScrollView);
CScrollView *pView =CScrollView *) ((CFrameWnd*)pFrameWnd)->CreateView(&pContext);
ASSERT(pView);
pView->ShowWindow(SW_NORMAL);
CRect rectWindow;
GetWindowRect(rectWindow);
rectWindow.right -= 5;
rectWindow.bottom -= 70;
pView->MoveWindow(rectWindow);
CCreateContext pContext;
CWnd* pFrameWnd = this;
pContext.m_pCurrentDoc = new CDocument;
pContext.m_pNewViewClass = RUNTIME_CLASS(CScrollView);
CScrollView *pView =CScrollView *) ((CFrameWnd*)pFrameWnd)->CreateView(&pContext);
ASSERT(pView);
pView->ShowWindow(SW_NORMAL);
CRect rectWindow;
GetWindowRect(rectWindow);
rectWindow.right -= 5;
rectWindow.bottom -= 70;
pView->MoveWindow(rectWindow);
改成
GetClientRect(&rectWindow);
试试GetWindowRect 是整个窗口相对于屏幕左上角的坐标
GetClientRect 是客户区相对于窗口左上角的坐标