CMFCDropDownToolbarButton::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
    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 required to display itself on the owner-draw list box.

This method extends the base class implementation (CMFCToolBarButton::OnDrawOnCustomizeList) by changing the text label of the button to the name of the button (that is,to the value of the lpszName parameter that you passed to the constructor).

Requirements

Header: afxdropdowntoolbar.h

See Also

Reference

CMFCDropDownToolbarButton Class

Hierarchy Chart

CMFCToolBarButton::OnDrawOnCustomizeList

CMFCDropDownToolbarButton::CMFCDropDownToolbarButton