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,
INT_PTR res = FALSE;
if (uMsg!=WM_INITDIALOG) {
PrintStructures = (PRINT_PTRW*) GetWindowLongW(hDlg, DWL_USER);
PrintStructures = (PRINT_PTRW*) GetPropW(hDlg, "__WINE_PRINTDLGDATA");
if (!PrintStructures)
return FALSE;
} else {
PrintStructures = (PRINT_PTRW*) lParam;
SetWindowLongA(hDlg, DWL_USER, lParam);
SetPropW(hDlg, "__WINE_PRINTDLGDATA", PrintStructures);
res = PRINTDLG_WMInitDialogW(hDlg, wParam, PrintStructures);
if(PrintStructures->dlg.lpPrintDlg->Flags & PD_ENABLEPRINTHOOK)
res = PrintStructures->dlg.lpPrintDlg->lpfnPrintHook(
hDlg, uMsg, wParam, (LPARAM)PrintStructures->dlg.lpPrintDlg
);
res = PrintStructures->dlg.lpPrintDlg->lpfnPrintHook(hDlg, uMsg, wParam, (LPARAM)PrintStructures->dlg.lpPrintDlg);
return res;
}
if(PrintStructures->dlg.lpPrintDlg->Flags & PD_ENABLEPRINTHOOK) {
res = PrintStructures->dlg.lpPrintDlg->lpfnPrintHook(hDlg,uMsg,wParam,
lParam);
res = PrintStructures->dlg.lpPrintDlg->lpfnPrintHook(hDlg,uMsg,wParam, lParam);
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