如何嵌入(Docking)一个工具条(How To Docking A Toolbar
EnableDocking(CBRS_ALIGN_ANY);
// Initialize dialog bar m_wndQuickConnect
if (!m_wndQuickConnect.Create(this, IDD_QUICKCONNECT,//IDD_QUICKCONNECT is a toolbar
CBRS_TOP | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_HIDE_INPLACE,
ID_VIEW_QUICKCONNECT))
{
TRACE0("Failed to create dialog bar m_wndQuickConnect\n");
return -1; // fail to create
}
m_wndQuickConnect.SetWindowText("Quick Connect");
m_wndQuickConnect.EnableDocking(CBRS_ALIGN_TOP | CBRS_ALIGN_BOTTOM);
DockControlBar(&m_wndQuickConnect);
ShowControlBar(&m_wndQuickConnect, FALSE, FALSE);
LoadBarState("QuickConnectState");
return 0;
}