Sent when the user selects an item in the ImageList Control.
idCtrl = (L_INT) LOWORD(wParam) identifier of control.
wNotifyCode = HIWORD(wParam) notification code.
pItemSel = (pLILITEMSEL) lParam pointer to item selection info structure.
Sent when the user selects an item in the ImageList Control. pItemSel contains information about the item that was selected.
The parent window of the control receives this notification message through the WM_COMMAND message.
Note: If you are subclassing the ImageList Control window, you can use the L_ILM_ITEMSELECTED message to get item selection notifications.
this function processes all the messages for a window
static HWND hCtl;
L_SIZE_T MainWndProc2(HWND hWnd, L_UINT Message, WPARAM wParam,
LPARAM lParam)
{
WORD wNotifyCode;
L_INT idCtl;
HWND hWndCtrl;
L_TCHAR buf[300];
pLILCLICK pClick ;
UNREFERENCED_PARAMETER(pClick);
pLILITEMSEL pItemSel;
switch (Message)
{
case WM_SETFOCUS:
if(hCtl)
SetFocus(hCtl);
break;
case WM_COMMAND:
wNotifyCode = HIWORD(wParam); // notification code
idCtl = LOWORD(wParam); // item, control, or accelerator identifier
hWndCtrl = (HWND) lParam; // handle of control
switch(idCtl)
{
case IDC_LEADIMAGELIST:
switch(wNotifyCode)
{
/* other code here */
case L_ILN_ITEMSEL:
pItemSel = (pLILITEMSEL)lParam;
if(pItemSel)
{
wsprintf(buf, TEXT("Item: %ld"), pItemSel->lIndex);
MessageBox(hWnd, buf, TEXT("Selected"), MB_OK);
}
break;
/* other code here */
}
break;
/* other code here */
}
break;
/* other code here */
}
return DefWindowProc (hWnd, Message, wParam, lParam);
}
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