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

CMFCCaptionBar::SetBitmap

Sets the bitmap image for the caption bar.

void SetBitmap(
   HBITMAP hBitmap,
   COLORREF clrTransparent,
   BOOL bStretch=FALSE,
   BarElementAlignment bmpAlignment=ALIGN_RIGHT 
);
void SetBitmap(
   UINT uiBmpResID,
   COLORREF clrTransparent,
   BOOL bStretch=FALSE,
   BarElementAlignment bmpAlignment=ALIGN_RIGHT 
);
[in] hBitmap

The handle to the bitmap to set.

[in] clrTransparent

An RGB value that specifies the transparent color of the bitmap.

[in] bStretch

If TRUE, the bitmap is stretched if it does not fit to the image bounding rectangle. Otherwise the bitmap is not stretched.

[in] bmpAlignment

The alignment of the bitmap.

Use this method to set a bitmap on a caption bar.

The previous bitmap is destroyed automatically. If the caption bar displays an icon because you called the CMFCCaptionBar::SetIcon method, the bitmap will not be displayed unless you remove the icon by calling CMFCCaptionBar::RemoveIcon.

The bitmap is aligned as specified by the bmpAlignment parameter. This parameter can be one of the following BarElementAlignment values:

  • ALIGN_INVALID

  • ALIGN_LEFT

  • ALIGN_RIGHT

  • ALIGN_CENTER

Header: afxcaptionbar.h

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