ui/win32/toolkit.c

changeset 919
d9018dcd4e2d
parent 918
7d3dd5aacfda
child 936
d40a72210be8
--- a/ui/win32/toolkit.c	Wed Nov 19 12:17:59 2025 +0100
+++ b/ui/win32/toolkit.c	Wed Nov 19 13:02:55 2025 +0100
@@ -129,7 +129,6 @@
 }
 
 LRESULT CALLBACK ui_default_eventproc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
-    printf("default event proc: %d, %d\n", (int)hwnd, (int)uMsg);
     fflush(stdout);
     W32Widget *widget = (W32Widget*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
     if (widget && widget->wclass->eventproc) {
@@ -148,6 +147,15 @@
             }
             break;
         }
+        case WM_NOTIFY: {
+            LPNMHDR hdr = (LPNMHDR)lParam;
+            HWND hwndCtrl = hdr->hwndFrom;
+            W32Widget *cmdWidget = (W32Widget*)GetWindowLongPtr(hwndCtrl, GWLP_USERDATA);
+            if (cmdWidget && cmdWidget->wclass->eventproc) {
+                cmdWidget->wclass->eventproc(cmdWidget, hwnd, uMsg, wParam, lParam);
+            }
+            break;
+        }
         case WM_SIZE: {
             int width  = LOWORD(lParam);
             int height = HIWORD(lParam);

mercurial