SetDIBits
SetDIBits is a function in the Windows API (Application Programming Interface) used to draw a bitmap directly into a device context. It takes a handle to a device context, a handle to a device-independent bitmap (DIB), and various other parameters that specify how the bitmap should be drawn. The function is primarily used for drawing bitmaps that are not already in the format of the target device.
The SetDIBits function copies pixel data from a DIB into a specified section of a device context.
When SetDIBits is called, it examines the DIB's format and, if necessary, converts the pixel data to