movewindow(....这里应该如何写,.....这里应该如何写,rect.Wight(),rect.Hight()/2,true);才能使窗口在原处不动,高度减半。

解决方案 »

  1.   

    nHeight = nHeight/2;BOOL MoveWindow( 
    int x, 
    int y, 
    int nWidth, 
    int nHeight, 
    BOOL bRepaint = TRUE); 
      

  2.   

    用SetWindowPos更加好,选择不移动的风格
      

  3.   

    用一个CPoint point变量操作取得point = rect.CenterPoint();在就在括号中填point.x-rect.width()/2,point.y+rect.height()/2
      

  4.   

    或者直接就操作rect.TopLeft(),rect.BottomRight()/2
      

  5.   

    CRect rect;
    GetWindowRect(&rect);
    MoveWindow(rect.left,rect.top,rect.Width(),rect.Height()/2);