|
I added a toolbar to the dialog box to display it, but I could n’t display it when I added more than one, still only the first
if (! m_wndToolBar1.CreateEx (this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_ALIGN_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) CR1 (Bar1) Toolbar! TO1
{
TRACE0 ("failed to create toolbar\n");
return FALSE;
}
m_wndToolBar1.SetBarStyle (m_wndToolBar1.GetBarStyle () | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
m_wndToolBar1.ShowWindow (SW_SHOW);
RepositionBars (AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0);
if (! m_wndToolBar2.CreateEx (this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_ALIGN_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) CR2 (Bar2) Toolbar! Toolbar! 2
{
TRACE0 ("failed to create toolbar\n");
return FALSE;
}
m_wndToolBar2.SetBarStyle (m_wndToolBar2.GetBarStyle () | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
m_wndToolBar2.ShowWindow (SW_SHOW);
RepositionBars (AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0);
Q: How can I make the second toolbar appear? |
|