We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.


Repaints a toolbar button.

virtual BOOL DrawButton(
   CDC* pDC,
   CMFCToolBarButton* pButton,
   CMFCToolBarImages* pImages,
   BOOL bHighlighted,
   BOOL bDrawDisabledImages 

[in] pDC

A pointer to a device context.

[in] pButton

A pointer to a button to draw.

[in] pImages

A pointer to the toolbar images.

[in] bHighlighted

TRUE if the button is highlighted; otherwise FALSE.

[in] bDrawDisabledImages

TRUE if disabled buttons are dimmed; otherwise FALSE.

TRUE if the button was repainted; FALSE if the button is hidden.

The CMFCToolBar::DrawButton method calls this method when a toolbar button must be repainted.

Override this method if you want to customize the appearance of buttons on your toolbar.

Header: afxtoolbar.h