BOOL CBookshopView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
//  the CREATESTRUCT cs
if(!CFormView::PreCreateWindow(cs))
{
return FALSE;
}
cs.cx=500;
cs.cy=500;
cs.x=10;
cs.y=10;
return TRUE;

}
这样高定窗口大小怎么不行?请指教.

解决方案 »

  1.   

    cs.cx=500;
    cs.cy=500;
    cs.x=10;
    cs.y=10;应该放在
    if(!CFormView::PreCreateWindow(cs))语句前面
      

  2.   

    BOOL CMaiFrame::PreCreateWindow(CREATESTRUCT& cs)
    {
    if(!CFrameWnd::PreCreateWindow(cs))
    {
    return FALSE;
    }
    cs.cx=500;
    cs.cy=500;
    cs.x=10;
    cs.y=10;
    return TRUE;

    }
      

  3.   

    这样绝对可以
    BOOL CMaiFrame::PreCreateWindow(CREATESTRUCT& cs)

            cs.cx=500;
    cs.cy=500;
    cs.x=10;
    cs.y=10;
            if(!CFrameWnd::PreCreateWindow(cs))
    {
    return FALSE;
    }

    return TRUE;

    }