CMDIChildWndEx Class
This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.
The CMDIChildWndEx class provides the functionality of a Windows multiple document interface (MDI) child window. It extends the functionality of CMDIChildWnd Class. The framework requires this class when an MDI application uses certain MFC classes.
class CMDIChildWndEx : public CMDIChildWnd
Members
Public Methods
Name |
Description |
---|---|
CMDIChildWndEx::ActivateFrame |
Activates and restores the frame window so that it is visible and available to the user. (Overrides CMDIChildWnd::ActivateFrame.) |
|
|
Adds a pane. |
|
Adds a tabbed pane. |
|
Adjusts the docking layout. |
|
|
|
Returns TRUE if the MDI child window name can be displayed in the CMFCWindowsManagerDialog Class dialog box. Otherwise returns FALSE. |
|
CMDIChildWndEx::CreateObject |
Called by the framework to create a dynamic instance of this class type. |
Docks a pane. |
|
Docks one pane to the left of another pane. |
|
Enables auto-hide mode for panes when they are docked at the specified sides of the window. |
|
Enables docking of the child window to the main frame. |
|
|
|
Returns the name of the document that is displayed in the MDI child window. |
|
Called by the framework to retrieve the MDI child window icon. |
|
Called by the framework to retrieve the text for the MDI child window. |
|
Finds a pane by the specified control ID. |
|
|
|
Returns a pointer to an embedded docking pane that was converted to a tabbed document. |
|
CMDIChildWndEx::GetThisClass |
Called by the framework to obtain a pointer to the CRuntimeClass object that is associated with this class type. |
Called by the framework to retrieve a tooltip for a toolbar button. |
|
Registers the specified pane with the docking manager. |
|
Determines whether a specified point is near the dock site. |
|
Returns TRUE if the document that is displayed in the child window is read-only. Otherwise returns FALSE. |
|
Returns TRUE if the MDI child window contains a docking pane. Otherwise returns FALSE. |
|
Called by the framework to move a mini-frame window. |
|
Called by the framework to enter or exit print preview mode. |
|
Called by the framework to update the frame title. (Overrides CMDIChildWnd::OnUpdateFrameTitle.) |
|
Returns the pane that contains the given point. |
|
CMDIChildWndEx::PreTranslateMessage |
Used by class CWinApp to translate window messages before they are dispatched to the TranslateMessage and DispatchMessage Windows functions. (Overrides CWnd::PreTranslateMessage.) |
Recalculates the layout of the window. |
|
Removes a pane from the docking manager. |
|
|
|
|
Remarks
To take advantage of extended docking features in MDI applications, derive the MDI child window class of your application from CMDIChildWndEx instead of CMDIChildWnd.
Example
The following example derives a class from CMDIChildWndEx. This code snippet comes from the VisualStudioDemo Sample: MFC Visual Studio Application.
class CChildFrame : public CMDIChildWndEx
{
DECLARE_DYNCREATE(CChildFrame)
public:
CChildFrame();
// Overrides
public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
virtual void ActivateFrame(int nCmdShow = -1);
virtual BOOL IsReadOnly();
virtual LPCTSTR GetDocumentName(CObject** pObj);
// Implementation
public:
virtual ~CChildFrame();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
DECLARE_MESSAGE_MAP()
};
Inheritance Hierarchy
Requirements
Header: afxMDIChildWndEx.h