Send this message to get the ImageList Control's item display options.
Parameter |
Description |
wParam |
Ignored, use 0. |
lParam |
Pointer to LILITEMOPTION structure to be filled with current display options. |
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 item display options are:
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:
L_ImgListGetItemOptions(hWnd, pItemOptions)
For a complete list of available macros, refer to the Ltlst.h file.
Elements: |
L_ILM_SETITEMOPTIONS, L_ILM_GETSELOPTIONS, L_ILM_SETITEMOPTIONS |
Topics: |
|
|
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;
}
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET