m_wndToolBar is a member of type CMFCToolBar. int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { . . . . 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(theApp.m_bHiColorIcons ? IDR_MAINFRAME_256 : IDR_MAINFRAME)) { TRACE0("Failed to create toolbar\n"); HCURSOR hCursor = AfxGetApp()->LoadStandardCursor(IDC_ARROW); SetCursor(hCursor); return -1; // fail to create } //I attempted to add a separator and change button style but nothing happened int iCount = m_wndToolBar.GetCount(); m_wndToolBar.InsertSeparator(8); for(int i = 9; i < iCount; i++) { m_wndToolBar.SetButtonStyle(i,TBBS_SEPARATOR); } . . . . . }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)