wineps.drv: Update dmFormName when dmPaperSize is being changed through UI.

This commit is contained in:
Dmitry Timoshkov 2012-12-24 14:56:13 +08:00 committed by Alexandre Julliard
parent c374201be1
commit ef489d647a
1 changed files with 6 additions and 0 deletions

View File

@ -337,6 +337,12 @@ static INT_PTR CALLBACK PSDRV_PaperDlgProc(HWND hwnd, UINT msg,
TRACE("Setting pagesize to item %d Winpage = %d\n", Cursel, ps->WinPage);
di->dlgdm->dmPublic.u1.s1.dmPaperSize = ps->WinPage;
di->dlgdm->dmPublic.dmFields |= DM_PAPERSIZE;
if (di->dlgdm->dmPublic.dmSize >= FIELD_OFFSET(DEVMODEW, dmFormName) + CCHFORMNAME * sizeof(WCHAR))
{
MultiByteToWideChar(CP_ACP, 0, ps->FullName, -1, di->dlgdm->dmPublic.dmFormName, CCHFORMNAME);
di->dlgdm->dmPublic.dmFields |= DM_FORMNAME;
}
SendMessageW(GetParent(hwnd), PSM_CHANGED, 0, 0);
}
break;