代码那里错了
if (!m_MyToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) || !m_MyToolBar.LoadToolBar(IDR_TOOLBAR_ADDRESS)) { TRACE0("Failed to create toolbar\n"); return -1; // fail to create }
m_MyToolBar.SetButtonInfo(0,ID_DUMMY,TBBS_SEPARATOR,500);
CRect rect; m_MyToolBar.GetItemRect(0,&rect); rect.top = 1; rect.bottom = rect.top +100;
m_MyToolBar.m_wndAddress.Create( CBS_DROPDOWNLIST|WS_VISIBLE,rect,&m_MyToolBar,IDR_COMBO);
// TOD Delete these three lines if you don't want the toolbar to // be dockable m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
m_MyToolBar.EnableDocking(CBRS_ALIGN_TOP); 没有错误提示 但是运行不了