LBitmapBase::ConvertFromDDB

#include "ltwrappr.h"

virtual L_INT LBitmapBase::ConvertFromDDB(hDC, hBitmap, hPalette)

Converts a Windows device dependent bitmap (DDB) into an LBitmapBase objects bitmap. When this function is completed, there are two copies of the image in memory: the original DDB and the LEAD bitmap. Freeing one will not affect the other.

Parameters

HDC hDC

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

HBITMAP hBitmap

Handle to the DDB to be converted.

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.
< 1 An error occurred. Refer to Return Codes.

Comments

This function updates information in the bitmap handle and copies the DDB image data into the LBitmapBase objects bitmap.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

For an example, refer to LBitmapBase::ConvertToDDB.

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

LEADTOOLS Raster Imaging C++ Class Library Help