Static Control + Notify



  • Hallo Leute!
    Könnt ihr mir sagen, wie ich die Nachrichten mehrerer Static-Controls
    abfangen kann? Es soll nämlich nur eine Meldung beim Klick auf ein bestimmtes
    Static-Control angezeigt werden.

    Mein Code sieht zur Zeit so aus:

    case WM_COMMAND:
    
    	   if (LOWORD(wParam) == STN_DBLCLK)
    	   {
    		   MessageBox(hwnd,"Du hast auf das STATICFELD geklickt !","STATIC",0);
    	   }
    
    	   return (TRUE);
    

    Vielen Dank!



  • The low-order word specifies the identifier of the menu item, control, or accelerator.

    Irgendwie machst du da was falsch. 🤡



  • Okay... hab es jetzt so geändert:

    case WM_COMMAND:
    
    	   if (wParam == STN_DBLCLK)
    	   {
    		   if (LOWORD(wParam) == 1)
    		   {
    		   MessageBox(hwnd,"Du hast auf das STATICFELD geklickt !","STATIC",0);
    		   }
    	   }
    
    	   return (TRUE);
    

    ... funktioniert leider immer noch net 😞



  • WM_COMMAND
    wNotifyCode = HIWORD(wParam); // notification code
    wID = LOWORD(wParam); // item, control, or accelerator identifier
    hwndCtl = (HWND) lParam; // handle of control


Anmelden zum Antworten