MFC: Creating and showing a second, docking toolbar
-
Hi, I've created a MDI project with the Doc/View architecture (which I don't use, but it has advantages). As you will know, CMainFrame initialises the standard docking toolbar. But I wanted another one, that contains dynamically updated buttons depending on the MDIChildWindow that is active. So I've got two questions: 1. How does the CMDIFrameWnd get message if a new child window has been created by CDocTemplate::OpenDocumentFile(NULL), and 2. how can I create a second, docking toolbar in the Mainframe Thanks in advance, Karl
-
Hi, I've created a MDI project with the Doc/View architecture (which I don't use, but it has advantages). As you will know, CMainFrame initialises the standard docking toolbar. But I wanted another one, that contains dynamically updated buttons depending on the MDIChildWindow that is active. So I've got two questions: 1. How does the CMDIFrameWnd get message if a new child window has been created by CDocTemplate::OpenDocumentFile(NULL), and 2. how can I create a second, docking toolbar in the Mainframe Thanks in advance, Karl
How does the CMDIFrameWnd get message if a new child window has been created by CDocTemplate::OpenDocumentFile(NULL) Check CWnd::OnMdiActivate. 2. how can I create a second, docking toolbar in the Mainframe Just like the first one. Add a CToolBar member to CMainFrame class and call CToolBar::Create and CToolBar::LoadToolBar. Have a look at CMainFrame::OnCreate for details. Tomasz Sowinski -- http://www.shooltz.com