|
-
January 13th, 2009, 11:37 AM
#1
[RESOLVED] modeless dialog in MDI app
I have an MDI application with windows that can maximize, minimize, etc.--all the default functionality you'd expect.
I have one MDI child window that behaves as a modeless dialog that I want to not maximize with the rest of the windows.
I know how to prevent the user from maximizing this window by removing the WS_MAXIMIZEBOX in PreCreateWindow, but then switching to this window will restore all other windows from a maximized state.
Is there a way to have some MDI child windows in a maximized state and others not?
Thanks for any help,
Jeff
-
January 13th, 2009, 12:22 PM
#2
Re: modeless dialog in MDI app
Nobody cares how it works as long as it works
-
January 13th, 2009, 12:57 PM
#3
Re: modeless dialog in MDI app
zerver,
Thanks for the answer. I tried it, and this solution only blocks the action of clicking on the maximize button. So, double clicking on the title bar still maximizes. There's likely another syscommand for this, but there is no sys command when the window is maximized due to another child window being maximized.
Any other ideas?
Jeff
-
January 13th, 2009, 01:26 PM
#4
Re: modeless dialog in MDI app
did you try handling WM_GETMINMAXINFO or WM_WINDOWPOSCHANGING and see what happens?
-
January 13th, 2009, 02:09 PM
#5
Re: modeless dialog in MDI app
Alin,
I did try handling WM_GETMINMAXINFO. It did correctly restrict the size of the window, but it still behaved maximized. It lost the title bar. Also when it was the active window, the other child windows showed in the restored state.
I'm fairly convinced that I can't get the behavior I want--at least not through simple message handling and window styles. I'm now going to look into solutions where the window is not a child window.
Thanks for the suggestion,
Jeff
-
January 14th, 2009, 04:57 AM
#6
Re: modeless dialog in MDI app
If you are desperate to do it, i guess you could make your own classes derived from CMDIFrameWnd / CMDIChildWnd.
Have a look in WINMDI.CPP, CMDIChildWnd::OnWindowPosChanging seems to adjust some sizes. CMDIChildWnd::UpdateClientEdge also seems interesting to you.
Nobody cares how it works as long as it works
-
January 14th, 2009, 10:12 AM
#7
Re: modeless dialog in MDI app
zerver,
Anything's possible--it's only software after all. It's just a matter of cost. I've learned that venturing off the beaten MFC path is fraught with peril. We're looking to other solutions which I'm sure will be acceptable.
Thanks for your help,
Jeff
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
|