Click here to Skip to main content
12,829,115 members (37,363 online)
Rate this:
Please Sign up or sign in to vote.
See more: 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
Rate this: bad
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.
Rate this: bad
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 :)

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.

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

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170326.1 | Last Updated 25 Sep 2012
Copyright © CodeProject, 1999-2017
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