Send this message to insert a list of bitmaps into the ImageList Control.
Ignored, use 0.
Pointer to the LILIMPORTBITMAPLIST structure that contains the list of bitmaps to be inserted.
Value | Meaning |
---|---|
SUCCESS | Function was successful. |
<0 | An error occurred. Refer to Error Codes. |
You must set the uStructSize member of the LILIMPORTBITMAPLIST structure before using this message.
The list of bitmaps found in the passed LILIMPORTBITMAPLIST structure (pointed to by lParam) will be inserted into the Image List control starting from nStartIndex to (nStartIndex + nItemsToInsert 1).
After inserting the list of bitmaps successfully into the ImageList control, do not try to free the bitmaps of the passed list (hLists bitmaps). The ImageList control references the hList bitmaps, and does not have a copy of them.
The associated macro is:
For a complete list of available macros, refer to the Ltlst.h file.
L_INT ILM_IMPORTBITMAPLISTExample(HWND hCtrl, HBITMAPLIST hList)
{
if(IsWindow(hCtrl) && hList)
{
L_UINT uCount =0;
// Getting the number of bitmaps in the list.
L_GetBitmapListCount(hList, &uCount);
if(uCount > 0) // There are some bitmaps
{
LILIMPORTBITMAPLIST ImportList;
ZeroMemory(&ImportList, sizeof(LILIMPORTBITMAPLIST));
ImportList.uStructSize = sizeof(LILIMPORTBITMAPLIST);
ImportList.hList = hList;
ImportList.nStartIndex = 0; // Start from Index 0.
ImportList.nItemsToInsert = uCount;// Import all the list bitmaps.
ImportList.pText = _T("Imported Bitmap-Text");
ImportList.pTextExt = _T("Imported Bitmap-TextExt");
L_INT nRet = (L_INT)SendMessage(hCtrl, L_ILM_IMPORTBITMAPLIST, (WPARAM)0, (LPARAM)(&ImportList));
/* update the control */
RedrawWindow(hCtrl, NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);
return nRet;
}
}
return ERROR_INVALID_PARAMETER;
}
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