Dummy-Frage: WM_COMMAND Butto abfangen
-
Hallo,
ioch bin neu bei der c++ Programmierung.
Wie kann ich in WM_COMMAND: abfangen, welcher Button geklickt wurde und was dann passieren soll?
Ich habe folgendes programmiert, geht aber leider nicht:
case WM_COMMAND: switch (HIWORD (wParam)) { case BS_PUSHBUTTON: if (SendMessage (BS_PUSHBUTTON, BN_CLICKED , 0, 0)) { MessageBox ( NULL, TEXT("Sodelle"), "geht", MB_ICONERROR); int GetWindowText( HWND hwndEdit, LPTSTR dobsa, int nMaxCount ); MessageBox ( NULL, TEXT("Hallo"), dobsa, MB_ICONERROR); } return 0; }Könnt Ihr mir bitte helfen?
Vielen Dank
Majo
-
Dein Anfang ist Müll.
So kann man nix lernen. Blind losprobieren ist nur Zeitverschwendung.
Geh auf www.winapi.net und les dir die Tutorials durch.MfG Tolga.
-
MSDN zu WM_COMMAND schrieb:
wParam
The high-order word specifies the notification code if the message is from a control. If the message is from an accelerator, this value is 1. If the message is from a menu, this value is zero.
The low-order word specifies the identifier of the menu item, control, or accelerator.lParam
Handle to the control sending the message if the message is from a control. Otherwise, this parameter is NULL.