共用方式為


CMFCVisualManager::OnDrawTearOffCaption

The framework calls this method when it draws the caption for a CMFCPopupMenu Class.

virtual void OnDrawTearOffCaption(
   CDC* pDC,
   CRect rect,
   BOOL bIsActive
);

Parameters

  • [in] pDC
    A pointer to a device context.

  • [in] rect
    A rectangle that specifies the boundaries of the caption.

  • [in] bIsActive
    TRUE if the caption is active; FALSE otherwise.

Remarks

This function is called by the framework when a CMFCPopupMenu object processes a WM_PAINT message and must draw a tear-off caption.

Override this method in a derived class to customize the look of captions for tear-off bars.

Requirements

Header: afxvisualmanager.h

See Also

Reference

CMFCVisualManager Class

Hierarchy Chart

CMFCPopupMenu Class