L_ILM_GETITEMOPTIONS
Send this message to get the ImageList Control's item display options.
Parameter |
Description |
wParam |
Ignored, use 0. |
lParam |
Pointer to LILITEMOPTIONS structure to be filled with current display options. |
Returns
SUCCESS |
Function was successful |
< 0 |
An error occurred. Refer to Return Codes. |
Comments
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 LILITEMOPTIONS 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.
See Also
Elements: |
L_ILM_SETITEMOPTIONS, L_ILM_GETSELOPTIONS, L_ILM_SETITEMOPTIONS |
Topics: |
|
|
Example
L_VOID TestFunc2(HWND hWnd)
{
LILITEMOPTION Opt; /* item options structure */
LRESULT lRet;
/* get current item options */
Opt.lStructSize = sizeof(LILITEMOPTION);
lRet = SendMessage(hWnd, 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 = FALSE;
lRet = SendMessage(hWnd, L_ILM_SETITEMOPTIONS, 0, (LPARAM)&Opt);
/* update the control */
RedrawWindow(hWnd, NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);
}