Static control [06/10]: STN_ENABLE and STN_DISABLE notifications

Michael Kaufmann hallo at michael-kaufmann.ch
Wed Jan 11 16:28:24 CST 2006


-------------- next part --------------
--- static-old.c	2006-01-11 22:43:23.000000000 +0100
+++ static.c	2006-01-11 22:44:20.000000000 +0100
@@ -31,10 +31,6 @@
  *   Styles
  *   - SS_RIGHTJUST
  *
- *   Notifications
- *   - STN_DISABLE
- *   - STN_ENABLE
- *
  *   Messages
  *   - STM_SETIMAGE: IMAGE_CURSOR
  */
@@ -391,7 +387,17 @@
         break;
 
     case WM_ENABLE:
-        InvalidateRect(hwnd, NULL, TRUE);
+        STATIC_TryPaintFcn( hwnd, full_style );
+        if (full_style & SS_NOTIFY) {
+            if (wParam) {
+                SendMessageW( GetParent(hwnd), WM_COMMAND,
+                              MAKEWPARAM( GetWindowLongPtrW(hwnd,GWLP_ID), STN_ENABLE ), (LPARAM)hwnd);
+            }
+            else {
+                SendMessageW( GetParent(hwnd), WM_COMMAND,
+                              MAKEWPARAM( GetWindowLongPtrW(hwnd,GWLP_ID), STN_DISABLE ), (LPARAM)hwnd);
+            }
+        }
         break;
 
     case WM_SYSCOLORCHANGE:


More information about the wine-patches mailing list