如题!
如果是基于对话框就可以直接拉伸。不知道在单文档界面的应用程序该怎么作。

解决方案 »

  1.   

    BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
    {
    //设置窗口尺寸
    cs.cx = 500;
    cs.cy = 400; //设置窗口位置
    cs.x = 100;
    cs.y = 50; return CFrameWnd::PreCreateWindow(cs);
    }
      

  2.   

    void CMainFrame::OnSetSize() 
    {
    // TODO: Add your command handler code here
    MoveWindow(0, 0, 200, 300);

    }
      

  3.   

    初始大小设置就象楼上说的。
    在程序中改变可以用:
    CRect rc;
    GetWindowRect(rc);
    AfxGetMainWnd()->MoveWindow(rc.left, rc.top,
               width, hight); //width,hight为新的宽度和高度,位置用原来的坐标
      

  4.   

    int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
    {
         .............
    CRect rect(0,0,800,600);
    this->MoveWindow(rect,true);
         ..............
    }