BCGControlBar Pro for MFC
void CBCGPCaptionBar::SetIcon ( HICON  hIcon,
BarElementAlignment  iconAlignment = ALIGN_RIGHT 
)

Sets an icon on a caption bar.

Use this function to set an icon on a caption bar.

Caption bars can display either icons or bitmaps (see SetBitmap()). If you set an icon and a bitmap together, the icon is displayed instead of the bitmap. Call 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 enumerated values:

  • ALIGN_LEFT
  • ALIGN_RIGHT
  • ALIGN_CENTER
Parameters
hIconThe handle to the icon to set.
iconAlignmentSpecifies the alignment of the icon.