diff options
author | George Hazan <george.hazan@gmail.com> | 2014-11-18 15:12:50 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-11-18 15:12:50 +0000 |
commit | 730d5d09fc38c5c92cc5f862c043e604448dc929 (patch) | |
tree | 647d3035204a73e8103333a5c66ac8211ef24d81 /plugins/SpellChecker/src/utils.cpp | |
parent | 8cebd2859be7808d238ae67320aca7e2eef4c1a1 (diff) |
fix for text underlining in SpellChecker
git-svn-id: http://svn.miranda-ng.org/main/trunk@11012 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SpellChecker/src/utils.cpp')
-rw-r--r-- | plugins/SpellChecker/src/utils.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
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<HWND, Dialog *> 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; |