How do you disable the Maximize button in MFC?
问题 How do you disable the Maximize button/capability in an SDI application? 回答1: For completeness: int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { ModifyStyle(WS_MAXIMIZEBOX, 0); <etc...> } 回答2: ModifyStyle(WS_MAXIMIZEBOX,0,SWP_FRAMECHANGED); // disable maximize ModifyStyle(WS_MINIMIZEBOX,0,SWP_FRAMECHANGED); // disable minimize ModifyStyle(0,WS_MAXIMIZEBOX,SWP_FRAMECHANGED); // enable maximize ModifyStyle(0,WS_MINIMIZEBOX,SWP_FRAMECHANGED); // enable minimize try this, should be