Professional UI Solutions
Site Map   /  Register
 
 

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.

Forums » Prof-UIS General Discussion » Position CExtToolControlBar in a CDialog Collapse All
Subject Author Date
Julien Garcia Dec 20, 2010 - 8:35 AM

Hello support,


I am using two CExtToolControlBar objects in a CExtResizableDialog.


In the "OnInitDialog" function of my dialog , I build my toolbars using command manager and LoadToolBar(...) function.


At the end of "OnInitDialog" function I use (as well as in the "OnSize" function) : CWnd::RepositionBars(0,0xFFFF,0).


By default, when running the program, these two toolbars are displayed, but are not in the same row.


At this time the result is :


m_wndToolBar1


m_wndToolBar2


What I want is :


m_wndToolBar1             m_wndToolBar2


How can I position my second toolbar to be on the same row than m_wndToolBar1 (on its right side),  and optionally put some space between these two toolbars.


Please note that position will be fixed, user cannot click on toolbar grip to move the toolbar.


I have also read you FAQ "How to dock a toolbar to another toolbar in the same row", but I can’t make it work, using the DockControlBar function.


Thanks in advance for any help,


Merry Christmas and a Happy New Year

Technical Support Dec 20, 2010 - 10:19 AM

Non-CFrameWnd-based windows can reposition child control bars only by taking up one horizontal row (or vertical column) for each bar. If you need to place two toolbars into one row, you should redesign your project. You should convert it into a frame based one. The main frame window should dock toolbars into the same row and create a dialog-based SDI view window. I.e. your current main popup dialog should be converted into a child dialog type and created as a SDI view window.

Technical Support Dec 20, 2010 - 10:21 AM

We wish you Merry Christmas and a very Happy New Year!