Example// Resize the list control contained in the view to // fill the entire view when the view's window is // resized. CMyView is a CView derived class. void CMyView::OnSize(UINT nType, int cx, int cy) { CView::OnSize(nType, cx, cy); // Resize list to fill the whole view. m_List.MoveWindow (0, 0, cx, cy); } 这是MSDN上面的例子,肯定没有错无的 你肯定那里搞错了! 在movewindow前一定要调用基类的ONSIZE函数!!
If the SetScrollPos or MoveWindow member function is called for a child window from OnSize, the bRedraw parameter of SetScrollPos or MoveWindow should be nonzero to cause the CWnd to be repainted
// fill the entire view when the view's window is
// resized. CMyView is a CView derived class.
void CMyView::OnSize(UINT nType, int cx, int cy)
{
CView::OnSize(nType, cx, cy);
// Resize list to fill the whole view.
m_List.MoveWindow (0, 0, cx, cy);
}
这是MSDN上面的例子,肯定没有错无的
你肯定那里搞错了!
在movewindow前一定要调用基类的ONSIZE函数!!