|
|
|
|
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 |
|
Francesco Toscano
|
Aug 22, 2007 - 12:26 PM
|
I do not know if it is possible, but I would like to make dockable a CExtToolControlBar in a CWnd (it is a grid that I use as view). I can see the toolbar, but it stay on top of the view and it is anlarged on all the width of the view and can’nt be moved. can it be displayed as a Toolbar in a Mainframe window? It can be dockable ?
I doing this on OnCreate of the view:
if((! m_wndToolBar.Create( NULL, this, IDR_PLANNER_TOOLBAR, WS_CHILD|WS_VISIBLE |CBRS_ALIGN_TOP|CBRS_TOOLTIPS |CBRS_FLYBY|CBRS_SIZE_DYNAMIC ) ) ||(!m_wndToolBar.LoadToolBar(IDR_PLANNER_TOOLBAR)) ) { TRACE0("Failed to create true-color toolbar\n"); return false; // fail to create } m_wndToolBar.SetBarStyle( m_wndToolBar.GetBarStyle() | CBRS_GRIPPER );
Thanks Francesco
|
|
Technical Support
|
Aug 22, 2007 - 1:27 PM
|
In the ProfStudio sample, you can find CExtToolControlBar windows created as children of CWnd windows inside control bars . But such toolbars are only statically docked to the left, right, top or bottom side of its parent window. If this is what you need, then you should simply create a toolbar and use CWnd::RepositionBars(0,0xFFFF,0); in these two places in toolbar’s parent window: in the WM_CREATE or WM_INITDIALOG handler method and in the WM_SIZE handler method. If you need a toolbar which can be redocked via drag-and drop, then your toolbar should be created in the frame window. The frame windows can be created either as popup windows and as child windows.
|
|