Click here to Skip to main content
12,759,704 members (32,137 online)
Rate this:
Please Sign up or sign in to vote.
See more: C++ MFC

I have a question concerning the CDialogBar (:CControlBar).

I habe a MDI application with a dockable toolbox (CDialogBar).
The user is able/allowed to move the DialogBar and to dock it at the right or left side

When I dock at the left side, the content of the mdi-application (all open windows) are moved right (so the dockable bar moves the windows).

If i dock at the right side, nothing changes.

How can I change the behaviour of the bar, that the windows inside the application keep the same position when I dock left ??

(Problem is, that my windows are aligned on the right side of the application). When I dock the bar on the left, the windows are getting moved in the not visible area.)

Thanks in advance fpr your help
Posted 18-Feb-13 2:16am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

To the best of my knowledge, this is a matter of how MFC is designed. The idea of docking is avoiding hiding any portion of the window underneath the docked windows. When you dock to the right side, the expected behavior would be reducing the widths of the window to make room for the docked window.

You might want to try one thing: change the RightToLeft attribute of the main window to TRUE.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Thanks for your answer.

Yes, this is by design :(

But I could solve it myself: I correct the window's position after docking.

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.170217.1 | Last Updated 20 Mar 2013
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