How to remove MAXIMIZE Option from SDI application
-
Hi How to remove MAXIMIZE Option from SDI application (at right upper corner). In this application the View class is derived from CFormView. Plz help me as soon as possible. Thanks in Advance.
use following window style while creating window ie in CreateWindow() function WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX this will disable maximize icon
-
use following window style while creating window ie in CreateWindow() function WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX this will disable maximize icon
for SDI BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) { cs.style = WS_OVERLAPPED | WS_SYSMENU | WS_BORDER; return CFrameWnd::PreCreateWindow(cs); } for MDI BOOL CMyChildWnd::PreCreateWindow(CREATESTRUCT& cs) { cs.style &= ~WS_MAXIMIZEBOX; return CMDIChildWnd::PreCreateWindow(cs); }
-
for SDI BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) { cs.style = WS_OVERLAPPED | WS_SYSMENU | WS_BORDER; return CFrameWnd::PreCreateWindow(cs); } for MDI BOOL CMyChildWnd::PreCreateWindow(CREATESTRUCT& cs) { cs.style &= ~WS_MAXIMIZEBOX; return CMDIChildWnd::PreCreateWindow(cs); }
hey i want to maximise my Child window similarly when the user clicks the MAXIMIZEBOX button . Is it possible programatically or not ? Vikas Amin Embin Technology Bombay vikas.amin@embin.com
-
Hi How to remove MAXIMIZE Option from SDI application (at right upper corner). In this application the View class is derived from CFormView. Plz help me as soon as possible. Thanks in Advance.
Hey, Sorry for late. just i came. This is also one way.
CDialog dlg;//This can be any window
dlg.ModifyStyle(WS_MAXIMIZEBOX,0);//To remove the max btn.
dlg.ModifyStyle(0,WS_MAXIMIZEBOX);//To add the max btn//Like this you can add any style and remove any style This is simple way. At runtime you can change the style of any control or any window. see about modifystyle in msdn. Nice talking to you. :-O