Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ MFC
Hi
 
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
good
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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Thanks for your answer.
 
Yes, this is by design Frown | :(
 
But I could solve it myself: I correct the window's position after docking.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 6,769
1 Sergey Alexandrovich Kryukov 6,338
2 DamithSL 5,408
3 Manas Bhardwaj 4,816
4 Maciej Los 4,195


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 20 Mar 2013
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