Send this message to insert an item into the ImageList Control.
Ignored, use 0.
Pointer to LILITEM structure containing the item to be inserted.
Value | Meaning |
---|---|
SUCCESS | Function was successful |
< 0 | An error occurred. Refer to Return Codes. |
This message will insert the specified item at the end of the list.
You must set the uStructSize member of the LILSELOPTION structure before using this message.
Note: On an insert, the image and text (if any) are copied to internal storage. The ImageList Control will free its copy of the image and/or text when the item is deleted. You are responsible for freeing the original data when it is no longer needed by your application.
The associated macro is:
For a complete list of available macros, refer to the Ltlst.h file.
L_INT ILM_INSERTExample(HWND hCtrl, pBITMAPHANDLE pBitmap)
{
if(IsWindow(hCtrl))
{
LILITEM Item;
L_TCHAR szText[200];
SYSTEMTIME st;
ZeroMemory(&Item, sizeof(LILITEM));
Item.uStructSize = sizeof(LILITEM);
Item.pBitmap = pBitmap;
Item.uBitmapStructSize = sizeof(BITMAPHANDLE);
Item.pText = szText;
Item.bSelected = FALSE;
Item.lData = 0;
Item.uMask = LILITEM_ALL;
GetSystemTime(&st);
wsprintf(szText, TEXT("%d:%d:%d"),st.wMinute,st.wSecond,st.wMilliseconds);
return (L_INT)SendMessage(hCtrl, L_ILM_INSERT, 0, (LPARAM)(pLILITEM)&Item);
}
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