1. 改寫CMainFrame::PreCreateWindow
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
cs.style &= ~WS_MAXIMIZEBOX;
cs.style &= ~WS_SIZEBOX;
return TRUE;
}
2. 處理CChildFrame的WM_SHOWWINDOW消息
void CChildFrame::OnShowWindow(BOOL bShow, UINT nStatus)
{
SetWindowPos(0, 0, 0, 400, 400, SWP_NOMOVE);
CMDIChildWnd::OnShowWindow(bShow, nStatus);
}
沒有留言:
張貼留言