VCEANCB_DrawDIB
The VCEANCB_DrawDIB function draws Device Independent Bitmap(DIB) generated by VCEANCB_GetDIB to device context (DC).
VCEANCB_Error VCEANCB_DrawDIB ( HDC hDC, // Handle to DC HGLOBAL hDIB, // Handle to DIB WORD xPos, // X position WORD yPos, // Y position WORD xSize, // Width of destination image WORD ySize // Height of destination image );
Parameter:
- hDC
- [in] Handle to a device context.
- hDIB
- [in] Pointer to DIB handle.
- xPos
- [in] Specifies the x-coordinate, in logical units, of the upper-left corner of the destination rectangle.
- yPos
- [in] Specifies the y-coordinate, in logical units, of the upper-left corner of the destination rectangle.
- xSize
- [in] Specifies the width, in logical units, of the destination rectangle.
- ySize
- [in] Specifies the height, in logical units, of the destination rectangle.
Return values:
If function succeeds, the return value is VCEANCB_Err_Success.
If function fails, the return value can be one of the following values.
VCEANCB_Err_badArgument | hDIB or hDC handle is bad (possibly NULL). |
VCEANCB_Err_noMemory | Not enough memory. |
VCEANCB_Err_UnknownError | Unknown (possibly system) error occurred. To get extended error information, call VCEANCB_SystemLastError. |
Remarks
This function sets DIBits from DIB to DC. If xSize and/or ySize is zero function uses original width and/or height of image. If xSize and/or ySize not equal to origin sizes of image, function uses StretchDIBits Microsoft® Windows® GDI function, otherwise function uses SetDIBitsToDevice function wich is faster.
See also:
VCEANCB_SnapFrame, VCEANCB_ReleaseDIB, VCEANCB_GetDIB, VCEANCB_SaveDIBToFile