如何在MDI结构的文档中初始化一个视图时,控制视图窗口的大小(???)急!!!,
本人由于在多文档结构中控制多个视图窗口显示,现在要求在每个窗口显示时,它的窗口大小显受到控制的.如何做到,请问修改什么?散分了100分.!!

解决方案 »

  1.   

    在childframe中的PreCreateWindow中可以用cs结构设置子窗口的大小。如果要使子窗口保持某个大小。可以在childframe中
    afx_msg void OnGetMinMaxInfo( MINMAXINFO FAR* lpMMI );
    在lpMMI中指定窗口的最大和最小大小。
    具体可以查看msdn.
      

  2.   

    在childframe中的PreCreateWindow中可以用cs结构设置子窗口的大小
    cs.x,cs.y分别子窗口的左上角的的坐标,cs.cx,cs.cy分别是子窗口的宽度和高度
      

  3.   

    接enoloo(行者无疆) CWnd::OnGetMinMaxInfo  
    afx_msg void OnGetMinMaxInfo( MINMAXINFO FAR* lpMMI );ParameterslpMMIPoints to a MINMAXINFO structure that contains information about a window’s maximized size and position and its minimum and maximum tracking size. For more about this structure, see the MINMAXINFO structure.typedef struct tagMINMAXINFO {
        POINT ptReserved;
        POINT ptMaxSize;
        POINT ptMaxPosition;
        POINT ptMinTrackSize;
        POINT ptMaxTrackSize;
    } MINMAXINFO;
      

  4.   

    CWindow::MoveWindow
    BOOL MoveWindow( int x, int y, int nWidth, int nHeight, BOOL bRepaint = TRUE );BOOL MoveWindow( LPCRECT lpRect, BOOL bRepaint = TRUE );SeeMoveWindow in the Win32 SDK.试试这个,,
    虽然我没做过,,不过有时间会做一下!