MDI Apps - Unable to Maximize Main Frame
I am trying to maximize the Main Frame window.I tried the following steps none of them worked out.Any body please help me giving some clue where the problem area is or where to look to sort out this problem.
1. in InitInstance() I have coded
if (!pMainFrame->LoadFrame(IDR_MAINFRAME,WS_OVERLAPPEDWINDOW|FWS_ADDTOTITLE|WS_MAXIMIZE))
2. In Precreatewindow() of CMainFrame class
cs.style = WS_OVERLAPPEDWINDOW|FWS_ADDTOTITLE|WS_MAXIMIZE;
3.In Precreatewindow() of CMainFrame class
cs.style |=WS_MAXIMIZE;
Thanx in advance.
Re: MDI Apps - Unable to Maximize Main Frame
Try this:
- Override the WM_SHOWWINDOW message handler in CMainFrame class and insert the following call in that handler:
AfxGetMainWnd()->ShowWindow(SW_SHOWMAXIMIZED);
Good luck!