#include "ltwrappr.h"
L_INT LBitmapBase::SetHandle(pBitmapHandle, bFreePrev=TRUE)
pBITMAPHANDLE pBitmapHandle; |
pointer to a LEAD bitmap handle |
L_BOOL bFreePrev; |
flag that indicates whether to free the previous bitmap |
Attaches a new LEAD bitmap handle to the LBitmapBase class object.
Parameter | Description | |
pBitmapHandle | Pointer to a LEAD bitmap handle that describes the bitmap to be attached to this object. This pointer will be invalidated if the function is successful, you can pass NULL if you only want to detach the current bitmap handle from the object. | |
bFreePrev | Flag that indicates whether to free the previous bitmap handle before attaching the new one. Possible values are: | |
Value | Meaning | |
TRUE | Free the previous bitmap handle before attaching the new one. | |
FALSE | Do not free the previous bitmap handle before attaching the new one. |
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Use this function to attach a new LEAD bitmap handle to this LBitmapBase class object. This function will call the LBitmapBase::StartChanging and LBitmapBase::EndChanging member functions before and after setting the bitmap handle.
Required DLLs and Libraries
LTDIS For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Win32, x64.
Functions: |
LBitmapBase::GetHandle, LBitmapBase::StartChanging, LBitmapBase::EndChanging, Class Members |
L_INT LBitmapBase__SetHandleExample()
{
L_INT nRet;
LBitmapBase MyBitmap;
BITMAPHANDLE SomeBitmapHandle;
nRet =L_InitBitmap(&SomeBitmapHandle, sizeof(SomeBitmapHandle),50, 50, 8);
if(nRet !=SUCCESS)
return nRet;
nRet =MyBitmap.Load(MAKE_IMAGE_PATH(TEXT("image1.cmp")));
if(nRet !=SUCCESS)
return nRet;
//1-free the bitmap
nRet =MyBitmap.SetHandle(0,TRUE);
if(nRet !=SUCCESS)
return nRet;
nRet =MyBitmap.Load(MAKE_IMAGE_PATH(TEXT("image1.cmp")));
if(nRet !=SUCCESS)
return nRet;
//2-Set another LEAD bitmap handle and free the previous one
nRet =MyBitmap.SetHandle(&SomeBitmapHandle,TRUE);
if(nRet !=SUCCESS)
return nRet;
nRet =MyBitmap.SetHandle(0,TRUE);
if(nRet !=SUCCESS)
return nRet;
//3-attach new bitmap without freeing the previous one
nRet =MyBitmap.SetHandle(&SomeBitmapHandle,FALSE);
if(nRet !=SUCCESS)
return nRet;
return SUCCESS;
}
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