Function Reference


Creates a compatible bitmap (DDB) from a DIB and, optionally, sets the bitmap bits

#include <WinAPIGdi.au3>
_WinAPI_CreateDIBitmap ( $hDC, $tBITMAPINFO, $iUsage [, $pBits = 0] )


$hDC Handle to a device context.
$tBITMAPINFO $tagBITMAPINFO structure that specifies various attributes of the DIB, including the bitmap dimensions and colors.
Note that a positive value for the height indicates a bottom-up DIB while a negative value for the height indicates a top-down DIB.
$iUsage The type of colors used. This parameter must be one of the following values:
$pBits [optional] A pointer to an array of bytes containing the initial bitmap data.

Return Value

Success: the handle to the compatible bitmap that will be whatever bit depth a reference DC is.
Failure: 0.


When you no longer need the bitmap, call the _WinAPI_DeleteObject() function to delete it.



See Also

Search CreateDIBitmap in MSDN Library.