Called by the framework when it needs to obtain a bitmap to be displayed on Windows 7 tab thumbnail, or on the client for application peek.

virtual void OnDrawIconicThumbnailOrLivePreview(
   CDC& dc,
   CRect rect,
   CSize szRequiredThumbnailSize,
   BOOL bIsThumbnail,
   BOOL& bAlphaChannelSet


Specifies the device context.


Specifies the bounding rectangle of the area to render.


Specifies the size of the target thumbnail. Should be ignored if bIsThumbnail is FALSE.


Specifies whether this method is called for iconic thumbnail or live preview (peek).


[out] Set it to TRUE if your implementation initializes the alpha channel of a bitmap selected in dc.

Override this method in a derived class and draw on the specified device context in order to customize thumbnail and peek. If bThumbnail is TRUE, szRequiredThumbnailSize can be ignored. In this case you should be aware that you draw full sized bitmap (that is, a bitmap that covers the whole client area). The device context (dc) comes with selected 32 bits bitmap. The default implementation sends WM_PRINT to this window with PRF_CLIENT, PRF_CHILDREN, and PRF_NONCLIENT flags.

Header: afxwin.h

Community Additions