Windows desktop applications
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Bitmap Creation

To create a bitmap, use the CreateBitmap, CreateBitmapIndirect, or CreateCompatibleBitmap function, CreateDIBitmap, and CreateDiscardableBitmap.

These functions allow you to specify the width and height, in pixels, of the bitmap. The CreateBitmap and CreateBitmapIndirect function also allow you to specify the number of color planes and the number of bits required to identify the color. On the other hand, the CreateCompatibleBitmap and CreateDiscardableBitmap functions use a specified device context to obtain the number of color planes and the number of bits required to identify the color.

The CreateDIBitmap function creates a device-dependent bitmap from a device-independent bitmap. It contains a color table that describes how pixel values correspond to RGB color values. For more information, see Device-Dependent Bitmaps and Device-Independent Bitmaps.

After the bitmap has been created, you cannot change its size, number of color planes, or number of bits required to identify the color.

When you no longer need a bitmap, call the DeleteObject function to delete it.

 

 

Community Additions

Show:
© 2016 Microsoft