Windows provides several ways to display a bitmap:
You can display a memory bitmap by using the BitBlt function to copy the bitmap from the memory device context to a device surface.
You can use the StretchBlt function to copy a stretched or compressed bitmap from a memory device context to a device surface.
You can use the CreatePatternBrush function to create a brush that incorporates the bitmap. Any subsequent GDI functions that use the brush, such as PatBlt, will display that bitmap.
You can use the SetDIBitsToDevice function to display a device-independent bitmap directly on the output device.
You can display the bitmap in a menu. In such a case, the bitmap is used as a menu item that the user can choose to carry out an action. For details, see “Using a Bitmap as a Menu Item”.
This section explains each method of displaying a bitmap.