public static extern IntPtr CreateDIBitmap([In] IntPtr hdc, ref IBitmapInfoHeader pbmih, uint flInit, [In] IntPtr pjBits, [In] ref BitmapInfo pbmi, DIBColorTable iUsage);
/// <summary> /// The CreateDIBitmap function creates a compatible bitmap (DDB) from a DIB and, optionally, sets the bitmap bits /// </summary> /// <param name="hdc">Handle to a device context</param> /// <param name="pbmih">Pointer to a bitmap information header structure, which may be one of those shown as /// Windows NT 3.51 and earlier - BITMAPINFOHEADER /// Windows 95 and Windows NT 4.0 - BITMAPV4HEADER /// Windows 98/Me and Windows 2000 - BITMAPV5HEADER /// </param> /// <param name="flInit">Specifies how the system initializes the bitmap bits. /// If fdwInit is zero, the system does not initialize the bitmap bits</param> /// <remarks>CBM_INIT : If this flag is set, the system uses the data pointed to by the lpbInit and lpbmi parameters to initialize the bitmap bits. /// If this flag is clear, the data pointed to by those parameters is not used</remarks> /// <param name="pjBits">Pointer to an array of bytes containing the initial bitmap data. The format of the data depends on the biBitCount member of /// the BITMAPINFO structure to which the lpbmi parameter points</param> /// <param name="pbmi">Pointer to a BITMAPINFO structure that describes the dimensions and color format of the array pointed to by the lpbInit parameter</param> /// <param name="iUsage">Specifies whether the bmiColors member of the BITMAPINFO structure was initialized and, if so, whether bmiColors contains explicit red, /// green, blue (RGB) values or palette indexes</param> /// <returns>If the function succeeds, the return value is a handle to the compatible bitmap, else null</returns> public static IntPtr CreateDIBitmap([In] IntPtr hdc, ref IBitmapInfoHeader pbmih, uint flInit, [In] IntPtr pjBits, [In] ref BitmapInfo pbmi, DIBColorTable iUsage) { return Native.CreateDIBitmap(hdc, ref pbmih, flInit, pjBits, ref pbmi, iUsage); }
/// <summary> /// The CreateDIBitmap function creates a compatible bitmap (DDB) from a DIB and, optionally, sets the bitmap bits /// </summary> /// <param name="hdc">Handle to a device context</param> /// <param name="pbmih">Pointer to a bitmap information header structure, which may be one of those shown as /// Windows NT 3.51 and earlier - BITMAPINFOHEADER /// Windows 95 and Windows NT 4.0 - BITMAPV4HEADER /// Windows 98/Me and Windows 2000 - BITMAPV5HEADER /// </param> /// <param name="flInit">Specifies how the system initializes the bitmap bits. /// If fdwInit is zero, the system does not initialize the bitmap bits</param> /// <remarks>CBM_INIT : If this flag is set, the system uses the data pointed to by the lpbInit and lpbmi parameters to initialize the bitmap bits. /// If this flag is clear, the data pointed to by those parameters is not used</remarks> /// <param name="pjBits">Pointer to an array of bytes containing the initial bitmap data. The format of the data depends on the biBitCount member of /// the BITMAPINFO structure to which the lpbmi parameter points</param> /// <param name="pbmi">Pointer to a BITMAPINFO structure that describes the dimensions and color format of the array pointed to by the lpbInit parameter</param> /// <param name="iUsage">Specifies whether the bmiColors member of the BITMAPINFO structure was initialized and, if so, whether bmiColors contains explicit red, /// green, blue (RGB) values or palette indexes</param> /// <returns>If the function succeeds, the return value is a handle to the compatible bitmap, else null</returns> public static IntPtr CreateDIBitmap([In] IntPtr hdc, ref IBitmapInfoHeader pbmih, uint flInit, [In] IntPtr pjBits, [In] ref BitmapInfo pbmi, DIBColorTable iUsage) { return(Native.CreateDIBitmap(hdc, ref pbmih, flInit, pjBits, ref pbmi, iUsage)); }