Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

docking toolbars problem

Posted on 1999-07-13
1
Medium Priority
?
423 Views
Last Modified: 2013-11-20
hi,
In my application I dock toolbars one next to the other. I have several set of toolbars for every document type.
when the user switches between views, I save in a data structure the position of all the toolbars of the de-activate document, and "load" the position of the toolbars of the activated document.

For re-docking the toolbars (when switching views), I'm using these functions :
DockControlBar (given the CRect of each toolbar).
ShowControlBar

The problem is that sometimes the docking toolbars starts a new line.

Can someone give me a hint what can cause this ?

Yoav.
0
Comment
Question by:yoavo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 23

Accepted Solution

by:
naveenkohli earned 150 total points
ID: 1309778
This problem is similar to the one you asked before i.e. wrapping the toolbars. To solve this problem, you can write a utility function which docks the toolbars next to each other (if space is available).

Here is the sample code for doing that. You calculate the rectangle of docking frame. Offset the rectangle by 1 unit. And then in call to DockCintrolBAr specify the side to which you want to dock the new bar with respect to existing one.

You can make use of this code and write a helper function to do this job.

********************************

CRect rect;
CToolBar *pExistingToolBar, *pNewToolBar;

CFrameWnd *pFrame = pExistingToolBar->GetDockingFRame ();

pFrame->ReCalcLayout ();

pExistingToolBar->GetWindowRect (&rect);

rect.Offset (1,1);

pFrame->DockControlBar (pNewToolBar, nToolBarID, &rect);


0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

715 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