Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic


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:





Header: afxcaptionbar.h

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.