Send this message to get the ImageList Control's item display options.
Ignored, use 0.
Pointer to LILITEMOPTION structure to be filled with current display options.
Value | Meaning |
---|---|
SUCCESS | Function was successful |
< 0 | An error occurred. Refer to Return Codes. |
The structure pointed to by lParam will be updated with the ImageList Control's current display options.
You must set the uStructSize member of the LILITEMOPTION structure before using this message.
The default option values are:
Option | Default value |
---|---|
uVerticalSpacing | 5 |
uHorizontalSpacing | 5 |
uWidth | 115 |
uHeight | 115 |
crBackground | GetSysColor(COLOR_BTNFACE) |
bDisplayItemText | TRUE |
crForeground | RGB(0,0,0) |
hFont | NULL (Times New Roman, 8 point) |
The associated macro is:
For a complete list of available macros, refer to the Ltlst.h file.
L_INT ILM_GETITEMOPTIONSExample(HWND hCtrl)
{
if(IsWindow(hCtrl))
{
LILITEMOPTION Opt; /* item options structure */
L_INT nRet;
ZeroMemory(&Opt, sizeof(LILITEMOPTION));
///* get current item options */
Opt.uStructSize = sizeof(LILITEMOPTION);
SendMessage(hCtrl, L_ILM_GETITEMOPTIONS, 0, (LPARAM)&Opt);
/* now, set some new options */
Opt.uVerticalSpacing = 10;
Opt.uHorizontalSpacing = 10;
if(Opt.uWidth < 100)
Opt.uWidth=100;
if(Opt.uHeight < 100)
Opt.uHeight=100;
Opt.crBackground = RGB(100,100,100);
Opt.bDisplayItemText = TRUE;
Opt.crForeground = RGB(255,0,0);
nRet = (L_INT)SendMessage(hCtrl, L_ILM_SETITEMOPTIONS, 0, (LPARAM)&Opt);
/* update the control */
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