Commit 0d6a2e9a authored by Mike Hearn's avatar Mike Hearn Committed by Alexandre Julliard

Store PrintStructures in a window property instead of extra window

bytes.
parent dcddfbc1
...@@ -2053,24 +2053,21 @@ INT_PTR CALLBACK PrintDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, ...@@ -2053,24 +2053,21 @@ INT_PTR CALLBACK PrintDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam,
INT_PTR res = FALSE; INT_PTR res = FALSE;
if (uMsg!=WM_INITDIALOG) { if (uMsg!=WM_INITDIALOG) {
PrintStructures = (PRINT_PTRW*) GetWindowLongW(hDlg, DWL_USER); PrintStructures = (PRINT_PTRW*) GetPropW(hDlg, "__WINE_PRINTDLGDATA");
if (!PrintStructures) if (!PrintStructures)
return FALSE; return FALSE;
} else { } else {
PrintStructures = (PRINT_PTRW*) lParam; PrintStructures = (PRINT_PTRW*) lParam;
SetWindowLongA(hDlg, DWL_USER, lParam); SetPropW(hDlg, "__WINE_PRINTDLGDATA", PrintStructures);
res = PRINTDLG_WMInitDialogW(hDlg, wParam, PrintStructures); res = PRINTDLG_WMInitDialogW(hDlg, wParam, PrintStructures);
if(PrintStructures->dlg.lpPrintDlg->Flags & PD_ENABLEPRINTHOOK) if(PrintStructures->dlg.lpPrintDlg->Flags & PD_ENABLEPRINTHOOK)
res = PrintStructures->dlg.lpPrintDlg->lpfnPrintHook( res = PrintStructures->dlg.lpPrintDlg->lpfnPrintHook(hDlg, uMsg, wParam, (LPARAM)PrintStructures->dlg.lpPrintDlg);
hDlg, uMsg, wParam, (LPARAM)PrintStructures->dlg.lpPrintDlg
);
return res; return res;
} }
if(PrintStructures->dlg.lpPrintDlg->Flags & PD_ENABLEPRINTHOOK) { if(PrintStructures->dlg.lpPrintDlg->Flags & PD_ENABLEPRINTHOOK) {
res = PrintStructures->dlg.lpPrintDlg->lpfnPrintHook(hDlg,uMsg,wParam, res = PrintStructures->dlg.lpPrintDlg->lpfnPrintHook(hDlg,uMsg,wParam, lParam);
lParam);
if(res) return res; if(res) return res;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment