The handle of the source DIB remains valid after this operation. Handle of a Windows color palette to be applied when the DIB is generated, such as a palette generated by a call to CreateDibPalette . If this parameter is NULL, the standard 16 or 20 color system palette is applied. DDBs generated by BitmapFromDib may only be used with the color palette applied during the DDB's creation.
Returns Returns the handle of the generated bitmap, or NULL if unsuccessful.
The bitmap handle must be released by the application using DeleteObject .