L_ILM_GETSELOPTIONS
Send this message to get the ImageList Control's current selection options.
Parameter |
Description |
wParam |
Ignored, use 0. |
lParam |
Pointer to an LILSELOPTION structure to be filled with the current 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 options.
You must set the uStructSize member of the LILSELOPTION
structure before using this message.
The default selection options are:
uAllowSelection |
ALLOWSELECTION_NONE |
uSelectionStyle |
SELECTIONSTYLE_SELECTCOLOR |
crSelection |
RGB(0,0,255) |
The associated macro is:
L_ImgListGetSelOptions(hWnd, pSelOptions)
For a complete list of available macros, refer to the Ltlst.h file.
See Also
Elements: |
L_ILM_SETSELOPTIONS, L_ILM_GETITEMOPTIONS, L_ILM_SETITEMOPTIONS |
Topics: |
|
|
Example
L_VOID TestFunc(HWND hWnd)
{
LILSELOPTION Opt; /* selection options structure */
LRESULT lRet;
/* get current selection options */
Opt.lStructSize = sizeof(LILSELOPTION);
lRet = SendMessage(hWnd, L_ILM_GETSELOPTIONS, 0, (LPARAM)&Opt);
/* now, set some new options */
if(Opt.uAllowSelection != ALLOWSELECTION_MULTI)
Opt.uAllowSelection = ALLOWSELECTION_MULTI;
Opt.uSelectionStyle = SELECTIONSTYLE_SELECTCOLOR;
Opt.crSelection = RGB(0,255,0);
lRet = SendMessage(hWnd, L_ILM_SETSELOPTIONS, 0, (LPARAM)&Opt);
/* update the control */
RedrawWindow(hWnd, NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);
}