Third party toolbar
-
Hi Can we load a third party toolbar into our application. Eg: I have a view class derived from CHtmlView.How can i load the additional toolbars downloaded for the Internet explorer. Thanks:)
As my knowledge, you need 2 toolbars. One supplied by MFC framework, and the other supplied by yourself. If so, read bellow. If not, leave now. In CMainFrame, create a CToolBar member variable, for example, it may be
CToolBar m_tbNew;
. InCMainFrame::OnCreate
, add the following code:m_tbNew.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC, CRect(0,0,0,0), ID_NEW_TOOLBAR); m_tbNew.SetWindowText("Caption here"); m_tbNew.LoadToolBar(IDR_NEW_TOOLBAR_RESOURCE); m_tbNew.EnableDocking(CBRS_ALIGN_ANY); DockControlBar(&m_tbNew);
The second toolbar will show beside default toolbar. Good luck. -
As my knowledge, you need 2 toolbars. One supplied by MFC framework, and the other supplied by yourself. If so, read bellow. If not, leave now. In CMainFrame, create a CToolBar member variable, for example, it may be
CToolBar m_tbNew;
. InCMainFrame::OnCreate
, add the following code:m_tbNew.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC, CRect(0,0,0,0), ID_NEW_TOOLBAR); m_tbNew.SetWindowText("Caption here"); m_tbNew.LoadToolBar(IDR_NEW_TOOLBAR_RESOURCE); m_tbNew.EnableDocking(CBRS_ALIGN_ANY); DockControlBar(&m_tbNew);
The second toolbar will show beside default toolbar. Good luck.