Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++/MFC
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 20-Sep-12 5:10am
sfuser151
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You need to resize one of them, either the child to fill the main window, or the main window to surround the child.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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 Smile | :)
 
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.
  Permalink  

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

  Print Answers RSS
0 CPallini 235
1 DamithSL 225
2 OriginalGriff 198
3 George Jonsson 170
4 Maciej Los 165
0 OriginalGriff 5,305
1 DamithSL 4,382
2 Maciej Los 3,760
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,901


Advertise | Privacy | Mobile
Web02 | 2.8.141216.1 | Last Updated 25 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100