BOOL MoveWindow( 
HWND hWnd, 
int X, 
int Y, 
int nWidth, 
int nHeight, 
BOOL bRepaint ); 

解决方案 »

  1.   

    SetWindowPos(hWnd, x, y, cx, cy, ...)
      

  2.   

    MFC:  PreCreateWindow()中改变cx、cy 的大小
    SDK: CreateWindow or CreateWindowEx 中指定即可
      

  3.   

    agree
    如果你是想在窗口出砚之前就改变的话,例如主窗口
    你要重载它的precreatewindow函数
      

  4.   

    确实很全了,稍微补充一下:
    MFC:  PreCreateWindow()中改变cx、cy 的大小
    最好再黑一点,把最大化按钮去掉;这儿还有一个办法,不常用。也就是 FixedDialog形式。 Windows 发送 WM_GETMAXMININFO消息来跟踪,响应它,在 OnGetMAXMININFO 中写代码:你的窗口大小可就限制死了