PATCH: fix 16bit printdlg

Marcus Meissner marcus at jet.franken.de
Fri May 4 05:19:37 CDT 2001


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

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:16:38
@@ -78,6 +78,27 @@
@@ -1648,9 +2080,14 @@
     }
 
     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
+	 */
+	WPARAM wParamNew = wParam | HIWORD(lParam);
+	LPARAM lParamNew = LOWORD(lParam);
+       return PRINTDLG_WMCommand(hDlg, wParamNew, lParamNew, PrintStructures);
+    }
     case WM_DESTROY:
 	DestroyIcon(PrintStructures->hCollateIcon);
 	DestroyIcon(PrintStructures->hNoCollateIcon);




More information about the wine-patches mailing list