CBitmap::CreateDiscardableBitmap

BOOLCreateDiscardableBitmap(CDC*pDC,intnWidth**,intnHeight);**

Return Value

Nonzero if successful; otherwise 0.

Parameters

pDC

Specifies a device context.

nWidth

Specifies the width (in bits) of the bitmap.

nHeight

Specifies the height (in bits) of the bitmap.

Remarks

Initializes a discardable bitmap that is compatible with the device context identified by pDC. The bitmap has the same number of color planes or the same bits-per-pixel format as the specified device context. An application can select this bitmap as the current bitmap for a memory device that is compatible with the one specified by pDC.

Windows can discard a bitmap created by this function only if an application has not selected it into a display context. If Windows discards the bitmap when it is not selected and the application later attempts to select it, the CDC::SelectObject function will return NULL.

When you finish with the CBitmap object created with the CreateDiscardableBitmap function, first select the bitmap out of the device context, then delete the CBitmap object.

CBitmap OverviewClass MembersHierarchy Chart

See Also   , CGdiObject::DeleteObject