Condividi tramite


CMFCToolBarButton::OnDrawOnCustomizeList

Called by the framework to draw the button in the Commands pane of the Customize dialog box.

virtual int OnDrawOnCustomizeList(
   CDC* pDC,
   const CRect& rect,
   BOOL bSelected 
);

Parameters

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

  • [in] rect
    The bounding rectangle of the button.

  • [in] bSelected
    Specifies whether the button is selected. If this parameter is TRUE, the button is selected. If this parameter is FALSE, the button is not selected.

Return Value

The width, in pixels, of the button on the specified device context.

Remarks

This method is called by the customization dialog box (Commands tab) when the button is about to display itself on the owner-draw list box.

The default implementation of this method displays the image and text label of the button if they are available. If the text label of the button is not available, the method displays the tooltip text.

Override this method to perform custom drawing.

Requirements

Header: afxtoolbarbutton.h

See Also

Reference

CMFCToolBarButton Class

Hierarchy Chart