Share via


CMFCDropDownFrame Class

Provides drop-down frame window functionality to drop-down toolbars and drop-down toolbar buttons.

class CMFCDropDownFrame : public CMiniFrameWnd

Members

Public Constructors

Name

Description

CMFCDropDownFrame::CMFCDropDownFrame

Default constructor.

CMFCDropDownFrame::~CMFCDropDownFrame

Destructor.

Public Methods

Name

Description

CMFCDropDownFrame::Create

Creates a CMFCDropDownFrame object.

CMFCDropDownFrame::CreateObject

Used by the framework to create a dynamic instance of this class type.

CMFCDropDownFrame::GetParentMenuBar

Retrieves the parent menu bar of the drop-down frame.

CMFCDropDownFrame::GetParentPopupMenu

Retrieves the parent pop-up menu of the drop-down frame.

CMFCDropDownFrame::GetThisClass

Used by the framework to obtain a pointer to the CRuntimeClass object that is associated with this class type.

CMFCDropDownFrame::RecalcLayout

Repositions the drop-down frame.

CMFCDropDownFrame::SetAutoDestroy

Sets whether the child drop-down toolbar window is destroyed automatically.

Remarks

This class is not intended to be used directly from your code.

The framework uses this class to provide frame behavior to the CMFCDropDownToolbar and CMFCDropDownToolbarButton classes. For more information about these classes, see CMFCDropDownToolBar Class and CMFCDropDownToolbarButton Class.

Example

The following example demonstrates how to retrieve a pointer to a CMFCDropDownFrame object from a CFrameWnd class, and how to set the child drop-down toolbar window to be destroyed automatically.

    CFrameWnd* pTopFrame = AFXGetParentFrame(this);
    if (pTopFrame == NULL)
    {
        return FALSE;
    }

    CMFCDropDownFrame* pDropFrame = DYNAMIC_DOWNCAST(CMFCDropDownFrame, pTopFrame);
    pDropFrame->SetAutoDestroy(true);

Inheritance Hierarchy

CObject

   CCmdTarget

      CWnd

         CFrameWnd

            CMiniFrameWnd

               CMFCDropDownFrame

Requirements

Header: afxdropdowntoolbar.h

See Also

Reference

Hierarchy Chart

CMFCDropDownToolBar Class

CMFCDropDownToolbarButton Class

Other Resources

MFC Classes