Dela via


CMFCToolBarEditBoxButton::OnCtlColor

Called by the framework when the parent toolbar handles a WM_CTLCOLOR message.

virtual HBRUSH OnCtlColor(
   CDC* pDC,
   UINT nCtlColor
);

Parameters

  • [in] pDC
    The device context that displays the button.

  • [in] nCtlColor
    Unused.

Return Value

A handle to the global window brush.

Remarks

This method overrides the base class implementation (CMFCToolBarButton::OnCtlColor) by setting the text and background colors of the provided device context to the global text and background colors, respectively.

For more information about global options that are available to your application, see AFX_GLOBAL_DATA Structure.

Requirements

Header: afxtoolbareditboxbutton.h

See Also

Concepts

MFC Hierarchy Chart

Reference

CMFCToolBarEditBoxButton Class

CMFCToolBarButton::OnCtlColor

AFX_GLOBAL_DATA Structure