Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Offer Har
|
Mar 21, 2007 - 7:43 AM
|
Dear Support, We have 4 bars that i dock like this:
m_ctrlBar1.DockControlBar(AFX_IDW_DOCKBAR_RIGHT, 1, this, true); m_ctrlBar2.DockControlBar(AFX_IDW_DOCKBAR_RIGHT, 1, this, true); m_ctrlBar2.DockControlBar(&m_ctrlBar1,true, true, this, false);
m_ctrlBar3.DockControlBar(AFX_IDW_DOCKBAR_TOP, 2, this, false); m_ctrlBar4.DockControlBarLTRB(20, &m_ctrlBar3, AFX_IDW_DOCKBAR_RIGHT, false);
We want bar1 & bar2 to be on the right side, and bar3 & bar4 on top, with bar4 to the right of bar3, and consuming less space then bar4. The problem is that no matter what we do, bar3 & bar4 have the same size.
What are we doing wrong?
Thanks, Ron.
|
|
Suhai Gyorgy
|
Mar 21, 2007 - 10:08 AM
|
I tried it, you have to set the last parameter to true in the last 2 calls, to force them to recalc layout:
m_ctrlBar3.DockControlBar(AFX_IDW_DOCKBAR_TOP, 2, this, true); m_ctrlBar4.DockControlBarLTRB(20, &m_ctrlBar3, AFX_IDW_DOCKBAR_RIGHT, true);
|
|
Offer Har
|
Mar 21, 2007 - 10:28 AM
|
Strange... It didn’t work for me. true or false, I see no difference, they are split 50-50 no matter what I do. Any other ideas what to look for?
Thanks, Ron.
|
|
Technical Support
|
Mar 21, 2007 - 11:29 AM
|
Could you repeat the same using control bars in our SDI sample? We believe the problem has to do with something we have not discussed yet.
|
|
Offer Har
|
Mar 21, 2007 - 8:47 PM
|
Dear Support,
I have found the problem, after porting it to the SDI sample and saw that it works there. It had to do with my main frame not being displayed. It is a full screen application, without title bar etc. and I did some working on hiding all these components that messed up all the sizes.
Now it works great!
Thanks, Ron.
|
|
Technical Support
|
Mar 21, 2007 - 11:09 AM
|
The CExtControlBar::DockControlBar() method is obsolete. We have not yet for compatibility issues (old versions). So use CExtControlBar::DockControlBarInnerOuter() and CExtControlBar::DockControlBarLTRB() methods instead. Please note that CFrameWnd::RecalcLayout() should be called before invoking CExtControlBar::DockControlBarLTRB() .
|
|
Offer Har
|
Mar 21, 2007 - 11:40 AM
|
That did not help. still 50-50. I will try and send you a working example.
|
|