Dela via


CMFCVisualManager::OnDrawMenuSystemButton

The framework calls this method when it draws a menu system button for the application.

virtual void OnDrawMenuSystemButton(
   CDC* pDC,
   CRect rect,
   UINT uiSystemCommand,
   UINT nStyle,
   BOOL bHighlight 
);

Parameters

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

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

  • [in] uiSystemCommand
    A flag that specifies which system command is associated with the button. Possible values are SC_CLOSE, SC_MINIMIZE, and SC_RESTORE.

  • [in] nStyle
    A flag that specifies the current style of the button. Possible values are TBBS_PRESSED, TBBS_DISABLED, and 0.

  • [in] bHighlight
    A Boolean parameter that specifies whether the button is highlighted.

Remarks

The menu system buttons are the Close, Minimize, Maximize, and Restore buttons located on the title bar.

The default implementation for this method calls CDC::DrawFrameControl with the DFC_CAPTION type. Override this method in your derived visual manager class to customize the appearance of system buttons.

Requirements

Header: afxvisualmanager.h

See Also

Concepts

MFC Hierarchy Chart

Reference

CMFCVisualManager Class