two toolBars side by side
C / C++ / MFC
3
Posts
2
Posters
0
Views
1
Watching
-
in My MDI, i have two toolBars. when run app, the standard toolBar is on top, another toolBar is below it. How can I manage the second toolBar beside the standard toolBar? thanks:^)
// NOTE: this is just a draft example to show the idea class CMainFrame : public CMDIFrameWnd { // ... CToolBar m_wndToolBar; CToolBar m_wndToolBar2; // ... }; int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { // ... create and other blah-blahs ... m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY); EnableDocking(CBRS_ALIGN_ANY); DockControlBar(&m_wndToolBar); RecalcLayout(); CRect rect; m_wndToolBar.GetWindowRect(rect); rect.OffsetRect(rect.right, 0); m_wndToolBar2.EnableDocking(CBRS_ALIGN_ANY); DockControlBar(&m_wndToolBar2, AFX_IDW_DOCKBAR_TOP, rect); return 0; }
Ovidiu Cucu Microsoft MVP - Visual C++ -- modified at 12:34 Saturday 24th June, 2006
-
// NOTE: this is just a draft example to show the idea class CMainFrame : public CMDIFrameWnd { // ... CToolBar m_wndToolBar; CToolBar m_wndToolBar2; // ... }; int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { // ... create and other blah-blahs ... m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY); EnableDocking(CBRS_ALIGN_ANY); DockControlBar(&m_wndToolBar); RecalcLayout(); CRect rect; m_wndToolBar.GetWindowRect(rect); rect.OffsetRect(rect.right, 0); m_wndToolBar2.EnableDocking(CBRS_ALIGN_ANY); DockControlBar(&m_wndToolBar2, AFX_IDW_DOCKBAR_TOP, rect); return 0; }
Ovidiu Cucu Microsoft MVP - Visual C++ -- modified at 12:34 Saturday 24th June, 2006