|
-
June 4th, 1999, 01:49 AM
#1
MDICHILDWINDOW
hai
i have to MDICHILD WINDOWS..........
how i can make my previous childwindow maximum when i close the active childwnd....
i removed the WS_OVERLAPPED WINDOW property of previous childwindow.
Suchitra...........
-
June 4th, 1999, 02:31 AM
#2
Re: MDICHILDWINDOW
Try this (i don't test it) :
WINDOWPLACEMENT pl;
child.GetWindowPlacement(&pl)
pl.flags=WPF_RESTORETOMAXIMIZED;
pl.showCmd=SW_SHOWMAXIMIZED;
child.SetWindowPlacement(&pl)
Hop this works.
-
June 4th, 1999, 02:32 AM
#3
Re: MDICHILDWINDOW
There is no need to remove WS_OVERLAPPEDWINDOW. Should all child frames be maximised? I can't see why you would only want one to be maximised. To create them maximised, override CChildFrame's PreCreateWindow() and add:
cs.style |= WS_MAXIMIZE
They will always fill the maximum space when they are created, then.
Does this help?
-
June 4th, 1999, 09:17 AM
#4
Re: MDICHILDWINDOW
Hello Jason Teagle,
Thank you for your response. Intially i want to show my application as SDI even though it is an MDI.SO,
I remove, ws_overlappedwindow...as to said i done the case thing but it give me a result.........
Suchitra.
-
June 4th, 1999, 09:20 AM
#5
Re: MDICHILDWINDOW
Hai eric33,
Thank you for your response.....but i wan to know where to paste that code which you suggest....we tried but we did't got the result
Suchitra.
-
June 4th, 1999, 09:37 AM
#6
Re: MDICHILDWINDOW
I think you have to use the code when you want the window to be maximized.
But i think there is a little mistake in code.
So try this :
WINDOWPLACEMENT pl;
child.GetWindowPlacement(&pl)pl.showCmd|=SW_SHOWMAXIMIZED;
child.SetWindowPlacement(&pl)
-
June 7th, 1999, 02:27 AM
#7
Re: MDICHILDWINDOW
I understand why you removed WS_OVERLAPPEDWINDOW now, to remove the minimize, restore and close boxes from the child frame. You will still need to logical-OR in the WS_MAXIMIZE bit during your override of CChildFrame::PreCreateWindow() to make it fill the whole space, though. You will also need to override the CWinApp::OnFileNew() behaviour to call CDocTemplate::SaveAllModified() and CDocTemplate::CloseAllDocuments() before opening the new document, so that you only have the one document open at a time, as with SDI.
-
June 7th, 1999, 06:38 AM
#8
Re: MDICHILDWINDOW
I have a relatively simpler solution. On the closure of a child window, post a custom message to the main frame window. In the message Handler, maximize the active child (Obtained through 'MDIGetActive' fn).
-
June 8th, 1999, 03:28 AM
#9
Re: MDICHILDWINDOW
hello
Thank you for your repsone..yes you got my idea...i got the solution in precreate window() i made cs &= ~system_menu instead
of overlapped window which behaves as i want........once again thankyou....
suchitra.....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|