Click here to Skip to main content
15,885,856 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi there,

I'm stuck with a problem and have to ask for the help.

I want to create an application that has only dockable panes (MSVC 2008, MFC based C++ project). Creating Single document w/o Document/View architecture (to keep it as simple as possible, but with support of dockable panes) I get almost what I want (dockable panes). The question is how to get rid of client area of MainFrame where there are no dockable panes left?
Let me clarify my question on an example. When I move one of my dockable panes it does not fit the client area entirely leaving space for imaginary CChildView which I don’t want to have. All I want is MainFrame always filled in with only dockable panes. Is it possible? I thought about rewriting resize event and expand one of the panes to fit client area, but I don't think it's a good idea.

Thanks in advance
Posted

You need to resize one of them, either the child to fill the main window, or the main window to surround the child.
 
Share this answer
 
Thank you Richard for your suggestion. Let me explain why I'm not keen to do resize. My application is SDI and therefore as far as I know I cannot resize or move client area. So, I have a sole option to move/size only dockable pane that will fill in the client area as soon as the user release the mouse. What I don't like is Windows will not highlight correctly the place where dockable pane will stick to (only part of client area) and only my code will zoom the pane to fit the client. I hope my explanation is not confusing :)

Actually I found another solution, not ideal but seams like working. It is to create MDI tabbed app. Since the user can group/regroup different tabs into groups (and therefore view frames) that's what I was looking for. The cons of this way, it's impossible to have vertical and horizontal groupping at the same time. But I can live with it.

Thank you anyway.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900