Commit 89ded8c8 authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

comdlg32: Set DEFAULT_CHARSET if CF_NOSCRIPTSEL is set.

parent ee3a3153
......@@ -1032,11 +1032,16 @@ static LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam, LPCHOOSEFO
get_dialog_font_point_size(hDlg, lpcf);
/* charset */
i=SendDlgItemMessageW(hDlg, cmb5, CB_GETCURSEL, 0, 0);
if (i!=CB_ERR)
lpxx->lfCharSet=SendDlgItemMessageW(hDlg, cmb5, CB_GETITEMDATA, i, 0);
else
if (lpcf->Flags & CF_NOSCRIPTSEL)
lpxx->lfCharSet = DEFAULT_CHARSET;
else
{
i=SendDlgItemMessageW(hDlg, cmb5, CB_GETCURSEL, 0, 0);
if (i!=CB_ERR)
lpxx->lfCharSet=SendDlgItemMessageW(hDlg, cmb5, CB_GETITEMDATA, i, 0);
else
lpxx->lfCharSet = DEFAULT_CHARSET;
}
lpxx->lfStrikeOut=IsDlgButtonChecked(hDlg,chx1);
lpxx->lfUnderline=IsDlgButtonChecked(hDlg,chx2);
lpxx->lfWidth=lpxx->lfOrientation=lpxx->lfEscapement=0;
......
......@@ -116,7 +116,7 @@ static void test_ChooseFontA(void)
cfa.Flags = CF_ENABLEHOOK|CF_INITTOLOGFONTSTRUCT|CF_SCREENFONTS|CF_NOSCRIPTSEL;
ret = ChooseFontA(&cfa);
ok(ret == TRUE, "ChooseFontA returned FALSE\n");
todo_wine ok(lfa.lfCharSet == DEFAULT_CHARSET, "Expected DEFAULT_CHARSET, got %i\n", lfa.lfCharSet);
ok(lfa.lfCharSet == DEFAULT_CHARSET, "Expected DEFAULT_CHARSET, got %i\n", lfa.lfCharSet);
printer_ic = get_printer_ic();
if (!printer_ic)
......
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