Changes an LBitmapBase object's internal LEAD bitmap handle to a Windows Device Dependent Bitmap (DDB). This function results in only one copy of the bitmap, and it invalidates the LEAD bitmap handle.
#include "ltwrappr.h"
static HBITMAP LChange::ChangeToDDB(hDC, pLBitmap)
Handle to the device responsible for the conversion. The mapping mode of the device context must be MM_TEXT.
Pointer to the bitmap object referencing the bitmap to change.
Value | Meaning |
---|---|
>0 | HBITMAP. |
0 | An error occurred. |
When you no longer need the DDB, you can free it using the Windows DeleteObject() function.
If this function fails, the return value is a NULL HBITMAP. This can happen if the image is too large for the Windows API functions that LEADTOOLS uses internally. To get more information about why the Windows API functions may have failed, you can use the Windows API GetLastError.
/* Change the initial bitmap to a DDB */
hDDB = LChange::ChangeToDDB( hDC, &MyBitmap );
if(!hDDB)
{
DWORD dwRet = GetLastError();
/* process the error code here */
}
Win32, x64.
For an example, refer to LChange::ChangeFromDDB.
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.