CreateDiscardableBitmap function (wingdi.h)
The CreateDiscardableBitmap function creates a discardable bitmap that is compatible with the specified device. The bitmap has the same bits-per-pixel format and the same color palette as the device. An application can select this bitmap as the current bitmap for a memory device that is compatible with the specified device.
HBITMAP CreateDiscardableBitmap(
[in] HDC hdc,
[in] int cx,
[in] int cy
);
[in] hdc
A handle to a device context.
[in] cx
The width, in pixels, of the bitmap.
[in] cy
The height, in pixels, of the bitmap.
If the function succeeds, the return value is a handle to the compatible bitmap (DDB).
If the function fails, the return value is NULL.
When you no longer need the bitmap, call the DeleteObject function to delete it.
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | wingdi.h (include Windows.h) |
Library | Gdi32.lib |
DLL | Gdi32.dll |