Dela via


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.)

CMDIChildWndEx::AddDockSite

 

CMDIChildWndEx::AddPane

Adds a pane.

CMDIChildWndEx::AddTabbedPane

Adds a tabbed pane.

CMDIChildWndEx::AdjustDockingLayout

Adjusts the docking layout.

CMDIChildWndEx::CanShowOnMDITabs

 

CMDIChildWndEx::CanShowOnWindowsList

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.

CMDIChildWndEx::DockPane

Docks a pane.

CMDIChildWndEx::DockPaneLeftOf

Docks one pane to the left of another pane.

CMDIChildWndEx::EnableAutoHidePanes

Enables auto-hide mode for panes when they are docked at the specified sides of the window.

CMDIChildWndEx::EnableDocking

Enables docking of the child window to the main frame.

CMDIChildWndEx::GetDockingManager

 

CMDIChildWndEx::GetDocumentName

Returns the name of the document that is displayed in the MDI child window.

CMDIChildWndEx::GetFrameIcon

Called by the framework to retrieve the MDI child window icon.

CMDIChildWndEx::GetFrameText

Called by the framework to retrieve the text for the MDI child window.

CMDIChildWndEx::GetPane

Finds a pane by the specified control ID.

CMDIChildWndEx::GetRelatedTabGroup

 

CMDIChildWndEx::GetTabbedPane

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.

CMDIChildWndEx::GetToolbarButtonToolTipText

Called by the framework to retrieve a tooltip for a toolbar button.

CMDIChildWndEx::InsertPane

Registers the specified pane with the docking manager.

CMDIChildWndEx::IsPointNearDockSite

Determines whether a specified point is near the dock site.

CMDIChildWndEx::IsReadOnly

Returns TRUE if the document that is displayed in the child window is read-only. Otherwise returns FALSE.

CMDIChildWndEx::IsTabbedPane

Returns TRUE if the MDI child window contains a docking pane. Otherwise returns FALSE.

CMDIChildWndEx::OnMoveMiniFrame

Called by the framework to move a mini-frame window.

CMDIChildWndEx::OnSetPreviewMode

Called by the framework to enter or exit print preview mode.

CMDIChildWndEx::OnUpdateFrameTitle

Called by the framework to update the frame title. (Overrides CMDIChildWnd::OnUpdateFrameTitle.)

CMDIChildWndEx::PaneFromPoint

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.)

CMDIChildWndEx::RecalcLayout

Recalculates the layout of the window.

CMDIChildWndEx::RemovePaneFromDockManager

Removes a pane from the docking manager.

CMDIChildWndEx::SetRelatedTabGroup

 

CMDIChildWndEx::ShowPane

 

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

CObject

   CCmdTarget

      CWnd

         CFrameWnd

            CMDIChildWnd

               CMDIChildWndEx

Requirements

Header: afxMDIChildWndEx.h

See Also

Concepts

MFC Hierarchy Chart

Reference

CMDIChildWnd Class

CMFCWindowsManagerDialog Class

CMDIFrameWndEx Class