L_ChangeFromDDB

Summary

Changes a Windows device dependent bitmap (DDB) to a LEAD bitmap.

Syntax

#include "l_bitmap.h"

L_LTDIS_API L_INT L_ChangeFromDDB(hDC, pBitmap, uStructSize, hBitmap, hPalette)

Parameters

L_HDC hDC

Handle to the device responsible for the conversion. The mapping mode of the device context must be MM_TEXT.

pBITMAPHANDLE pBitmap

Address of the LEAD bitmap handle.

L_UINT uStructSize

Size in bytes, of the structure pointed to by pBitmap, for versioning. Use sizeof(BITMAPHANDLE).

L_HBITMAP hBitmap

Handle to the DDB to be changed.

L_HPALETTE hPalette

Handle to the palette. This value can be NULL if the hDC parameter refers to a device that is greater than 8 bits, or if the bitmap will use the system palette.

Returns

Value Meaning
SUCCESS The function was successful.
< 0 An error occurred. Refer to Return Codes.

Comments

This function results in only one copy of the bitmap, and it invalidates the DDB handle.

This function does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this function.

Before calling this function, you must declare the LEAD bitmap handle, but you should not allocate the bitmap, because the new bitmap handle will point to the previous DDB data after the function is called. (If the bitmap is already allocated, you must free it.)

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

For an example, refer to L_ChangeToDDB.

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.