propsheet fix

Aric Stewart aric at codeweavers.com
Tue Jan 27 15:31:36 CST 2004


Changelog: figured out from observing Native Comctl32. If a WM_COMMAND 
message is not processed by the Property sheet then send it to the 
active tab to be processed there.

fixes a bug in Remedy

LGPL patch
-aric
-------------- next part --------------
Index: dlls/comctl32/propsheet.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/propsheet.c,v
retrieving revision 1.92
diff -u -w -r1.92 propsheet.c
--- dlls/comctl32/propsheet.c	4 Nov 2003 04:23:00 -0000	1.92
+++ dlls/comctl32/propsheet.c	27 Jan 2004 21:29:29 -0000
@@ -2773,12 +2773,35 @@
     case IDHELP:
 	PROPSHEET_Help(hwnd);
 	break;
+
+    default:
+    return FALSE;
+    break;
     }
 
     return TRUE;
 }
 
 /******************************************************************************
+ *            PROPSHEET_SendCommandToPage
+ */
+static BOOL PROPSHEET_SendCommandToPage(HWND hwnd, WPARAM wParam, LPARAM lParam)
+{
+    PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwnd, PropSheetInfoStr);
+
+    if (!psInfo)
+        return FALSE; 
+
+    HWND hwndPage = psInfo->proppage[psInfo->active_page].hwndPage;
+
+    if (hwndPage)
+        return SendMessageW(hwndPage,WM_COMMAND,wParam,lParam);
+    else
+        return FALSE;
+}
+
+
+/******************************************************************************
  *            PROPSHEET_DialogProc
  */
 INT_PTR CALLBACK
@@ -2901,7 +2924,10 @@
       return TRUE;
 
     case WM_COMMAND:
-      return PROPSHEET_DoCommand(hwnd, LOWORD(wParam));
+      if (PROPSHEET_DoCommand(hwnd, LOWORD(wParam)))
+        return TRUE;
+      else
+        return PROPSHEET_SendCommandToPage(hwnd,wParam,lParam);
 
     case WM_NOTIFY:
     {


More information about the wine-patches mailing list