The WM_GETMINMAXINFO message is sent to a window when the size or position of the window is about to change. An application can use this message to override the window's default maximized size and position, or its default minimum or maximum tracking size. return a fixed size in this message handler
处理WM_GETMINMAXINFO消息函数即可
void CMainFrame::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI)
{
lpMMI->ptMaxSize.x=670;
lpMMI->ptMaxSize.y=600;
lpMMI->ptMinTrackSize.x=670;
lpMMI->ptMinTrackSize.y=600;
//最大尺寸
// lpMMI->ptMaxTrackSize.x=650;
// lpMMI->ptMaxTrackSize.y=600;
CFrameWnd::OnGetMinMaxInfo(lpMMI);
}