[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Docking CControlBar derived classes in a CFrameWnd

Posted on 2004-11-09
4
Medium Priority
?
525 Views
Last Modified: 2013-11-20
I want to be able to dock 2 CControlbar dervied objects on the same side of a CFrameWnd in an SDI application forcing them to always stack on top of each other and never go side by side in the same area of the frame.  Or to be more specifc if the user drags one of these controlbars to the same side of the frame(lets say left) that the other one already exists on I NEVER want it to dock to the left or right of that control bar, but always above or below it (but still on the left side of the frame).  

Which of course leads me into the next problem of resizing each control bar appropriately depending on how much space they can occupy on the frames docking bar.

I have tried to search for a message that will notify me when a control bar is docked to the frame so I could make any necessary adjustments there, thinking that if I find out I have just docked 1 control bar on the same side where another one exists then I can simply recall DockControlBar on that one to force it above or below the existing one since the default behavior does not stick them side by side.

I have tried changing the CalcFixedLayout and CalcDynamicLayout functions of my control bar thinking I could change the rect in which it draws, but I have not succeeded.
0
Comment
Question by:JRVision2
3 Comments
 
LVL 23

Accepted Solution

by:
Roshan Davis earned 375 total points
ID: 12541443
0
 
LVL 2

Assisted Solution

by:teuntje
teuntje earned 375 total points
ID: 12560662
you can use an external library.
we use: http://www.bcgsoft.com/bcgcontrolbar.htm
0
 

Author Comment

by:JRVision2
ID: 12566792
Thanks guys, I've seen the sizecbar and been to the datamekanix web site before.  I'd like to avoid using any 3rd party toolkits or other subclasses.  Plus it bothers me there isn't a good way using just MFC.  I tried plugging in the sizecbar stuff and even it docks side by side sometimes when I don't want it to.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question