L_LTKRN_API L_INT L_ReplaceBitmapListItem(hList, uIndex, pNewBitmap, pOldBitmap, uStructSize)
Removes a bitmap from the list, and lets you treat it as an individual bitmap.
Handle to the list of bitmaps.
Position of the bitmap in the list. Use zero-based indexing. For example, if there are 10 bitmaps in a list, the index of the last one is 9. When you remove a bitmap from a list, the indexes of other bitmaps change to accommodate the removal.
Pointer to the bitmap handle that will replace the existing bitmap handle in the list.
Pointer to the bitmap handle that will be updated with the existing bitmap handle from the list.
Size in bytes, of the structure pointed to by pBitmap, for versioning. Use sizeof(BITMAPHANDLE).
|SUCCESS||The function was successful.|
|< 1||An error occurred. Refer to Return Codes.|
After calling this function, the bitmap handle in the list references the original image data, not a copy. Therefore, you should not free the bitmap that you pass in, but should instead manage the memory using the related list functions (L_DeleteBitmapListItems and L_DestroyBitmapList).
This function does not free the old bitmap. If you want to remove a bitmap from a list and free the bitmap, you should use L_DeleteBitmapListItems.
You cannot use this function to update a bitmap list while it is being used in an animation playback.
Required DLLs and Libraries
Win32, x64, Linux.
This example replaces the 3rd item from the bitmap list.
L_INT ReplaceBitmapListItemExample(HBITMAPLIST hList, BITMAPHANDLE * pNewBitmap)
BITMAPHANDLE OldBitmap; /* OldBitmap */
/* Replace item #3, and free the old bitmap */
nRet = L_ReplaceBitmapListItem(hList, 3, pNewBitmap, &OldBitmap, sizeof(BITMAPHANDLE));
if(nRet != SUCCESS)
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries