Rebar
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
I am using VC++ of Visual Studio .NET. The problem here is When I create two tool bars and add them to a rebar as follows the two toolbars will be at each side. I want them both to be Left Aligned one after the other. Note: the very same code works as i want in VC++ 6 of Visual Studio 6.
if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP /*| CBRS_GRIPPER*/ | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) || !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) { TRACE0("Failed to create toolbar\n"); return -1; // fail to create } if (!m_wndClientToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP /*| CBRS_GRIPPER*/ | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) || !m_wndClientToolBar.LoadToolBar(IDR_CLIENTTOOLBAR)) { TRACE0("Failed to create toolbar\n"); return -1; // fail to create } if (!m_wndReBar.Create(this) || !m_wndReBar.AddBar(&m_wndToolBar) || !m_wndReBar.AddBar(&m_wndClientToolBar)) { TRACE0("Failed to create rebar\n"); return -1; // fail to create } if (!m_wndStatusBar.Create(this) || !m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT))) { TRACE0("Failed to create status bar\n"); return -1; // fail to create }
Thanks.