Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Collapse the table of content
Expand the table of content


Called by the framework to draw the specified image on the ribbon category.

virtual BOOL OnDrawImage(
   CDC* pDC,
   CRect rect,
   CMFCRibbonBaseElement* pElement,
   BOOL bIsLargeImage,
   BOOL nImageIndex,
   BOOL bCenter

[in] pDC

Pointer to a device context for the image.

[in] rect

Display rectangle for the image.

[in] pElement

Pointer to the ribbon element that contains the image.

[in] bIsLargeImage

TRUE if the image is the large size; FALSE if the image is the small size.

[in] nImageIndex

Zero-based index of the image in the image array that is contained in the ribbon category.

[in] bCenter

TRUE to center the image in the display rectangle; FALSE to draw the image in the upper-left corner of the display rectangle.

TRUE if the method was successful; otherwise FALSE.

Header: afxribboncategory.h

© 2015 Microsoft