From 730d5d09fc38c5c92cc5f862c043e604448dc929 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 18 Nov 2014 15:12:50 +0000 Subject: fix for text underlining in SpellChecker git-svn-id: http://svn.miranda-ng.org/main/trunk@11012 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SpellChecker/src/utils.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'plugins/SpellChecker/src/utils.cpp') diff --git a/plugins/SpellChecker/src/utils.cpp b/plugins/SpellChecker/src/utils.cpp index 6661274c21..77358aba0f 100644 --- a/plugins/SpellChecker/src/utils.cpp +++ b/plugins/SpellChecker/src/utils.cpp @@ -25,15 +25,21 @@ typedef map DialogMapType; DialogMapType dialogs; DialogMapType menus; +struct CHARFORMAT5 : public CHARFORMAT2 +{ + BYTE bUnderlineColor; +}; + void SetUnderline(Dialog *dlg, int pos_start, int pos_end) { dlg->re->SetSel(pos_start, pos_end); - CHARFORMAT2 cf; + CHARFORMAT5 cf; cf.cbSize = sizeof(CHARFORMAT2); cf.dwMask = CFM_UNDERLINE | CFM_UNDERLINETYPE; cf.dwEffects = CFE_UNDERLINE; - cf.bUnderlineType = ((opts.underline_type + CFU_UNDERLINEDOUBLE) | 0x50); + cf.bUnderlineType = opts.underline_type + CFU_UNDERLINEDOUBLE; + cf.bUnderlineColor = 0x05; dlg->re->SendMessage(EM_SETCHARFORMAT, (WPARAM)SCF_SELECTION, (LPARAM)&cf); dlg->markedSomeWord = TRUE; -- cgit v1.2.3