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;
}
这样高定窗口大小怎么不行?请指教.
{
// 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;
}
这样高定窗口大小怎么不行?请指教.
cs.cy=500;
cs.x=10;
cs.y=10;应该放在
if(!CFormView::PreCreateWindow(cs))语句前面
{
if(!CFrameWnd::PreCreateWindow(cs))
{
return FALSE;
}
cs.cx=500;
cs.cy=500;
cs.x=10;
cs.y=10;
return TRUE;
}
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;
}