PATCH: fix 16bit printdlg

Marcus Meissner marcus at jet.franken.de
Fri May 4 05:28:09 CDT 2001


On Fri, May 04, 2001 at 12:19:37PM +0200, Marcus Meissner wrote:
> Hi,
> 
> Win16 style WM_COMMAND wParam and lParam were passed as Win32 style. 
> We need to map them, or we do not get the correct notification codes.
> 
> Now you can change printers in 16bit programs :)
> 
> Ciao, Marcus
> 

Actually it was a bit broken, since it did not do <<16.
This one is even tested ;)

Ciao, Marcus
Changelog:
 	fixed WM_COMMAND notification codes for 16 bit PrintDlg.

Index: printdlg.c
===================================================================
RCS file: /home/wine/wine/dlls/commdlg/printdlg.c,v
retrieving revision 1.40
diff -u -r1.40 printdlg.c
--- printdlg.c	2001/05/02 01:10:43	1.40
+++ printdlg.c	2001/05/04 11:28:13
@@ -1648,9 +2080,17 @@
     }
 
     switch (uMsg) {
-    case WM_COMMAND:
-        return PRINTDLG_WMCommand(hDlg, wParam, lParam, PrintStructures);
-
+    case WM_COMMAND: {
+	 /* We need to map those for the 32bit window procedure, compare
+	  * with 32Ato16 mapper in winproc.c
+	  */
+        return PRINTDLG_WMCommand(
+		hDlg,
+		MAKEWPARAM(wParam,HIWORD(lParam)),
+		LOWORD(lParam),
+		PrintStructures
+	);
+    }
     case WM_DESTROY:
 	DestroyIcon(PrintStructures->hCollateIcon);
 	DestroyIcon(PrintStructures->hNoCollateIcon);




More information about the wine-patches mailing list