Commit 95d98d0b authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

wineps.drv: Update dmPaperWidth/Height when dmPaperSize is being changed through UI.

parent a701528f
......@@ -340,10 +340,15 @@ static INT_PTR CALLBACK PSDRV_PaperDlgProc(HWND hwnd, UINT msg,
if(i >= Cursel) break;
i++;
}
TRACE("Setting pagesize to item %d Winpage = %d\n", Cursel, ps->WinPage);
TRACE("Setting pagesize to item %d, WinPage %d (%s), PaperSize %.2fx%.2f\n", Cursel,
ps->WinPage, ps->FullName, ps->PaperDimension->x, ps->PaperDimension->y);
di->dlgdm->dmPublic.u1.s1.dmPaperSize = ps->WinPage;
di->dlgdm->dmPublic.dmFields |= DM_PAPERSIZE;
di->dlgdm->dmPublic.u1.s1.dmPaperWidth = paper_size_from_points(ps->PaperDimension->x);
di->dlgdm->dmPublic.u1.s1.dmPaperLength = paper_size_from_points(ps->PaperDimension->y);
di->dlgdm->dmPublic.dmFields |= DM_PAPERLENGTH | DM_PAPERWIDTH;
if (di->dlgdm->dmPublic.dmSize >= FIELD_OFFSET(DEVMODEW, dmFormName) + CCHFORMNAME * sizeof(WCHAR))
{
MultiByteToWideChar(CP_ACP, 0, ps->FullName, -1, di->dlgdm->dmPublic.dmFormName, CCHFORMNAME);
......
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