On 20.11.2014 10:42, Ralf Habacker wrote:
if(Sel != CB_ERR)
if(Sel != CB_ERR) { lpdm->u1.s1.dmPaperSize = SendDlgItemMessageW(hDlg, cmb2, CB_GETITEMDATA, Sel, 0);
GetDlgItemTextW(hDlg, cmb2, lpdm->dmFormName, sizeof(lpdm->dmFormName));
}
This looks wrong, this function takes character length, not byte length.