CMDIClientAreaWnd Class
The CMDIClientAreaWnd class is a helper class that simplifies implementation of MDI tabs and MDI tabbed groups.
class CFrameClientAreaWnd : public CWnd
Members
Public Constructors
Name |
Description |
---|---|
Constructs a CMDIClientAreaWnd object. |
Public Methods
Name |
Description |
---|---|
Determines whether MDI tabs are enabled. |
|
Enables or disables MDI tabs. When tabs are enabled, the frame window displays a tab for each MDI child window. |
|
Returns a reference to the embedded CMFCTabCtrl Class object. |
|
Sets the active tab. |
|
Synchronizes the icon and text of the tab label with the icon and text of the MDI child window. |
Remarks
This class supports the MFC framework infrastructure and is not intended to be used directly from your code.
An object of this class is embedded into CMDIFrameWndEx Class and serves as a wrapper for CMFCTabCtrl Class objects. In addition, it maintains a list of images that are displayed as document icons on tab labels.
If you have enabled the MDI Tabbed Groups feature, this class maintains a list of CMFCTabCtrl Class objects and provides methods to work with them. Typically, you would not call these methods directly, because they are all exposed by CMDIFrameWndEx Class.
Example
The following example demonstrates how to use various methods in the CMDIClientAreaWnd class. The example shows how to send a message, post a message, synchronize the icon and text of the tab label with the icon and text of the MDI child window, and set the active tabe. This code snippet is part of the MDITabsDemo Sample: MFC Tabbed MDI Application.
// CMDIClientAreaWnd m_wndClientArea
hwndActive = (HWND) m_wndClientArea.SendMessage (WM_MDIGETACTIVE);
m_wndClientArea.PostMessage (WM_MDICASCADE);
m_wndClientArea.UpdateTabs( false );
m_wndClientArea.SetActiveTab(hwndActive);
Requirements
Header: afxcontrolbars.h