Send this message to get the specified item from the ImageList Control.
0-based index of the item to get.
Pointer to LILITEM structure to be filled with the item.
Value | Meaning |
---|---|
SUCCESS | Function was successful |
< 0 | An error occurred. Refer to Return Codes. |
The LILITEM structure pointed to by lParam specifies the information to retrieve and will be filled with the information about the item. The uMask member of the LILITEM structure indicates the attributes of the item to retrieve.
You must set the uStructSize member of the LILITEM structure before using this message.
If you are including the LILITEM_BITMAP flag in the uMask member of the LILITEM structure, you must set the uBitmapStructSize member of the LILITEM structure before using this message.
The associated macro is:
After this function returns, the LILITEM structure pointed to by lParam will reference the specified item. You can use the pBitmap or pText members of the structure to modify the item. If you modify the bitmap or text pointed to by this structure, you will be directly modifying the item in the ImageList Control. You should not attempt to free the memory pointed to by pBitmap or pText.
For a complete list of available macros, refer to the Ltlst.h file.
L_INT ILM_GETITEMExample(HWND hCtrl)
{
if(IsWindow(hCtrl))
{
LILITEM Item;
L_INT nRet;
/* get the 3rd item */
ZeroMemory(&Item, sizeof(LILITEM));
Item.uStructSize = sizeof(LILITEM);
Item.uBitmapStructSize = sizeof(BITMAPHANDLE);
Item.uMask = LILITEM_BITMAP|LILITEM_TEXT; /* retrieve the bitmap & the text */
nRet = (L_INT)SendMessage(hCtrl, L_ILM_GETITEM, 2, (LPARAM)&Item);
if(nRet == SUCCESS)
{
MessageBox(hCtrl, Item.pText, TEXT("Item"), MB_OK);
/* flip the image and update the control */
L_FlipBitmap(Item.pBitmap);
RedrawWindow(hCtrl, NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);
}
return nRet;
}
else
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