Sends this message to export a number of bitmaps from the ImageList Control to a Bitmap List.
Ignored, use 0.
Pointer to the LILEXPORTBITMAPLIST structure that contains the list of bitmaps to be exported.
|SUCCESS||Function was successful.|
|<0||An error occurred. Refer to Error Codes.|
You must set the uStructSize member of the LILEXPORTBITMAPLIST structure before using this message.
The list of bitmaps will be exported from the ImageList control into the passed hList starting from nStartIndex to (nStartIndex + nItemsToExport 1).
If you passed NULL into the hList member of the passed LILEXPORTBITMAPLIST structure, this parameter hList will be created internally and is going to contain all the exported bitmaps.
After exporting the list of bitmaps successfully from the ImageList control, do not try to free the bitmaps of the exported hList list; since it is going to have a reference to the original bitmaps, not a copy of them.
The associated macro is:
For a complete list of available macros, refer to the Ltlst.h file.
L_INT ILM_EXPORTBITMAPLISTExample(HWND hCtrl, L_TCHAR * lpOutputFileName)
L_INT nRet = SUCCESS;
// Check if the ImageList control has more than 4 images.
if(SendMessage(hCtrl, L_ILM_GETITEMCOUNT, 0, 0L) > 4)
ExportList.uStructSize = sizeof(LILEXPORTBITMAPLIST);
ExportList.nStartIndex = 1; // Start from index 1
ExportList.nItemsToExport = 2; // Export only 2 images.
// Export images
nRet = (L_INT)SendMessage(hCtrl, L_ILM_EXPORTBITMAPLIST, (WPARAM)0, (LPARAM)(&ExportList));
// Check if the images exported successfully
// Save the exported images to a disk-file
nRet = L_SaveBitmapList(lpOutputFileName,
// Remove all of the BITMAPHANDLEs from the HBITMAPLIST because the ImageList owns them.
L_UINT uCount = 0;
for(L_INT x = uCount-1; x >= 0; x--)
L_RemoveBitmapListItem(ExportList.hList, x, &Bitmap);
// Free the HBITMAPLIST
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries