Click to See Complete Forum and Search --> : MDI Apps - Unable to Maximize Main Frame


tguha
September 3rd, 1999, 04:17 PM
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.

Homero
September 3rd, 1999, 07:10 PM
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!