BCGControlBar Pro for MFC
BOOL CBCGPToolBarImages::DrawEx ( CDC *  pDC,
CRect  rect,
int  iImageIndex,
ImageAlignHorz  horzAlign = ImageAlignHorzLeft,
ImageAlignVert  vertAlign = ImageAlignVertTop,
CRect  rectSrc = CRect(0, 0, 0, 0),
BYTE  alphaSrc = 255,
BOOL  bIsIgnoreAlpha = FALSE,
UINT  nSimplifyState = 0 
)

Called when an image maintained by a toolbar images object need to be rendered.

Returns
Nonzero if the specified image was displayed successfully; it is 0 if the image index was invalid or some other error occurred.

Call this function to display the specified by iImageIndex image.

Parameters
pDCA pointer to a device context.
rectSpecifies the image destination coordinates.
iImageIndexSpecifies the zero-based index of the image to be displayed.
horzAlignSpecifies image horizontal alignment.
vertAlignSpecifies image vertical alignment.
rectSrcSpecifies the image source coordinates.
alphaSrcAlpha [0-255].
bIsIgnoreAlphaSpecifies whether to draw image with alpha or not.
nSimplifyStateThe icon simplification state is: 0 - don't simplify, 1 - simplify to a white icon, and 1 - inverse luminosity.