Export (0) Print
Expand All

CMFCCaptionBar::SetIcon

Sets the icon for a caption bar.

void SetIcon(
   HICON hIcon,
   BarElementAlignment iconAlignment=ALIGN_RIGHT 
);

[in] hIcon

The handle to the icon to set.

[in] iconAlignment

The alignment of the icon.

Caption bars can display either icons or bitmaps. See CMFCCaptionBar::SetBitmap to find out how to display a bitmap. If you set both an icon and a bitmap, the icon is always displayed. Call CMFCCaptionBar::RemoveIcon to remove an icon from the caption bar.

The icon is aligned according to the iconAlignment parameter. It can be one of the following BarElementAlignment values:

  • ALIGN_INVALID

  • ALIGN_LEFT

  • ALIGN_RIGHT

  • ALIGN_CENTER

Header: afxcaptionbar.h

Show:
© 2014 Microsoft