Dylan Smith : richedit: Keep default char format on WM_SETFONT in plain text mode.
Module: wine Branch: master Commit: 6072a69d384f27f434c52bc1018ace311b75acfa URL: http://source.winehq.org/git/wine.git/?a=commit;h=6072a69d384f27f434c52bc101... Author: Dylan Smith <dylan.ah.smith(a)gmail.com> Date: Sun Jun 6 14:57:44 2010 -0400 richedit: Keep default char format on WM_SETFONT in plain text mode. --- dlls/riched20/editor.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 5bed094..b4bff4f 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -3502,16 +3502,18 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, CHARFORMAT2W fmt; HDC hDC; BOOL bRepaint = LOWORD(lParam); - ME_Cursor start; if (!wParam) - wParam = (WPARAM)GetStockObject(SYSTEM_FONT); + wParam = (WPARAM)GetStockObject(SYSTEM_FONT); GetObjectW((HGDIOBJ)wParam, sizeof(LOGFONTW), &lf); hDC = ITextHost_TxGetDC(editor->texthost); - ME_CharFormatFromLogFont(hDC, &lf, &fmt); + ME_CharFormatFromLogFont(hDC, &lf, &fmt); ITextHost_TxReleaseDC(editor->texthost, hDC); - ME_SetCursorToStart(editor, &start); - ME_SetCharFormat(editor, &start, NULL, &fmt); + if (editor->mode & TM_RICHTEXT) { + ME_Cursor start; + ME_SetCursorToStart(editor, &start); + ME_SetCharFormat(editor, &start, NULL, &fmt); + } ME_SetDefaultCharFormat(editor, &fmt); ME_CommitUndo(editor);
participants (1)
-
Alexandre Julliard