Home » Category » Microsoft Visual C & C++

Microsoft Visual C & C++: Docking Multiple Control Bars on the same side

205| Mon, 02 Jun 2008 13:38:00 GMT| anonymous| Comments (1)
Hello,
I am trying to initiate my application custom made
ControlBars docked on the left of the frame but I am not
getting the right result:

To illustrate what I want to do picture the Microsoft
Visual Studio enviroment. Normally you start with a few
Control bars docked to the side of the frame. Mine for
instance has the "Class View" and then just below
the "Properties Window" , they are both docked to the same
side one above the other. My problem is iamigne if when
you started your MS Visual Studio instead of having both
controlBars one above the other, you would have them
SIDE by SIDE, taking almost half the space on your
application frame :S

Here is my pseudo code, for part of my
CMainFrame::OnCreate:

MyControlBarA.Create( .blah blah ... , WS_VISIBLE |
CBRS_LEFT | CBRS_SIZE_DYNAMIC);
MyControlBarA.EnableDocking(CBRS_ALIGN_LEFT);
DockControlBar(&MyControlBarA, AFX_IDW_DOCKBAR_LEFT);

MyControlBarB.Create( .blah blah ... , WS_VISIBLE |
CBRS_LEFT | CBRS_SIZE_DYNAMIC);
MyControlBarB.EnableDocking(CBRS_ALIGN_LEFT);
DockControlBar(&MyControlBarB, AFX_IDW_DOCKBAR_LEFT);

What can i do differentl to fix it?
By the way, once the applciation starts I can manually
move the ContorlBars to dock one above the other.
Obviously my goal is to achieve that automatically when
the application starts.

Thanks a bunch

Keywords & Tags: docking, multiple, control, bars, same, side, microsoft, visual c++, vc

URL: http://www.7prog.com/visual-c-c++/94947/
 
«« Prev - Next »» 1 helpful answers below.
This shows how to do it:
http://www.codeguru.com/toolbar/demo_toolbar_d.shtml
--
Ajay Kalra [MVP - VC++]
ajaykalra...yahoo.com

"Abelardo Vacca" <vacca...gebo-indust.com> wrote in message
news:0b2d01c3681f$6ec70f00$a001280a...phx.gbl...
> Hello,
> I am trying to initiate my application custom made
> ControlBars docked on the left of the frame but I am not
> getting the right result:
> To illustrate what I want to do picture the Microsoft
> Visual Studio enviroment. Normally you start with a few
> Control bars docked to the side of the frame. Mine for
> instance has the "Class View" and then just below
> the "Properties Window" , they are both docked to the same
> side one above the other. My problem is iamigne if when
> you started your MS Visual Studio instead of having both
> controlBars one above the other, you would have them
> SIDE by SIDE, taking almost half the space on your
> application frame :S
> Here is my pseudo code, for part of my
> CMainFrame::OnCreate:
> MyControlBarA.Create( .blah blah ... , WS_VISIBLE |
> CBRS_LEFT | CBRS_SIZE_DYNAMIC);
> MyControlBarA.EnableDocking(CBRS_ALIGN_LEFT);
> DockControlBar(&MyControlBarA, AFX_IDW_DOCKBAR_LEFT);
> MyControlBarB.Create( .blah blah ... , WS_VISIBLE |
> CBRS_LEFT | CBRS_SIZE_DYNAMIC);
> MyControlBarB.EnableDocking(CBRS_ALIGN_LEFT);
> DockControlBar(&MyControlBarB, AFX_IDW_DOCKBAR_LEFT);
>
> What can i do differentl to fix it?
> By the way, once the applciation starts I can manually
> move the ContorlBars to dock one above the other.
> Obviously my goal is to achieve that automatically when
> the application starts.
> Thanks a bunch
>

ajay | Mon, 02 Jun 2008 13:39:00 GMT |

Microsoft Visual C & C++ Hot Answers

Microsoft Visual C & C++ New questions

Microsoft Visual C & C++ Related Categories