L_ILN_ITEMUNSEL

Sent when the user unselects one or more items in the ImageList Control.

Parameter

Description

wParam

idCtrl = (L_INT) LOWORD(wParam) identifier of control.

 

wNotifyCode = HIWORD(wParam) notification code.

lParam

pItemSel = (pLILITEMSEL) lParam pointer to item selection info structure..

Comments

Sent when the user unselects one or more items in the ImageList Control. pItemSel contains information about the item that was unselected.

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_ITEMUNSELECTED message to get item unselection notifications.

See Also

Elements:

L_ILN_SETFOCUS, L_ILN_KILLFOCUS, L_ILN_HSCROLL, L_ILN_VSCROLL, L_ILN_CLICKED, L_ILN_DBLCLCK, L_ILN_ITEMSEL, L_ILN_KEYDOWN, L_ILM_ITEMSELECTED, L_ILM_ITEMUNSELECTED

Topics:

Using the ImageList Control
Image List Control Command Notifications

Example

this function processes all the messages for a window

L_SIZE_T MainWndProc7 (HWND hWnd, L_UINT Message, WPARAM wParam,
                                   LPARAM lParam)
{
   WORD wNotifyCode;
   L_INT idCtl;
   HWND hWndCtrl;
   L_TCHAR buf[300];
   pLILITEMSEL pItemSel;

   switch (Message)
   {
      case WM_SETFOCUS:
         if(hWnd)
            SetFocus(hWnd);
         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_ITEMUNSEL:
                     pItemSel = (pLILITEMSEL)lParam;
                     if(pItemSel)
                     {
                        wsprintf(buf, TEXT("Item: %ld"), pItemSel->lIndex);
                        MessageBox(hWnd, buf, TEXT("UnSelected"), MB_OK);
                     }
                     break;
                  /* other code here */
               }
               break;
               /* other code here */
         }
         break;
         /* other code here */
   }
   return DefWindowProc (hWnd, Message, wParam, lParam);
}