The CMFCOutlookBar class has an underlying CMFCOutlookBarTabCtrl to which you can add tabs. These appear as tab page buttons in the CMFCOutlookBar.
If you call CMFCOutlookBar::SetMode2003 to set the Office 2003 UI mode then the CMFCOutlookBar will contain a toolbar window as well. In 2003 mode, if you collapse the tab page buttons by sliding the divider between the tab page buttons and the tab view pane then as each tab page button is removed, a corresponding toolbar button is added to the toolbar. Furthermore, if you size the entire CMFOutlookBar so that the window is not wide enough to display all of the toolbar buttons, then the toolbar chevron button context menu will contain a menu item for each tab page button that is not visible and does not have a toolbar button.
When you click the tab page button, or it's corresponding toolbar button, or it's corresponding chevron button menu item, the corresponding tab becomes the active tab displayed in the CMFCOutookBar. If you wish to do custom processing when the tab is changed you can handle the registered message AFX_WM_CHANGE_ACTIVE_TAB that is sent to your application main frame window.
AFX_WM_CHANGE_ACTIVE_TAB is a custom windows message registered by MFC in afxbasetabctrl.cpp. This message is sent to the main frame window when either:
To handle the active tab change message you can add a message handler for this message in your mainframe window:
Here is the message map entry you need.
A possible OnChangeActiveTab handler:
Article ID: 2000702 - Last Review: 04/20/2010 22:00:00 - Revision: 1.0