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 | |
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')
-rw-r--r-- | plugins/SpellChecker/src/Version.h | 14 | ||||
-rw-r--r-- | plugins/SpellChecker/src/utils.cpp | 10 |
2 files changed, 15 insertions, 9 deletions
diff --git a/plugins/SpellChecker/src/Version.h b/plugins/SpellChecker/src/Version.h index c7e688acf0..332b26758c 100644 --- a/plugins/SpellChecker/src/Version.h +++ b/plugins/SpellChecker/src/Version.h @@ -1,14 +1,14 @@ -#define __MAJOR_VERSION 0
-#define __MINOR_VERSION 2
-#define __RELEASE_NUM 6
-#define __BUILD_NUM 1
+#define __MAJOR_VERSION 0
+#define __MINOR_VERSION 2
+#define __RELEASE_NUM 6
+#define __BUILD_NUM 2
#include <stdver.h>
#define __PLUGIN_NAME "Spell checker"
-#define __FILENAME "SpellChecker.dll"
+#define __FILENAME "SpellChecker.dll"
#define __DESCRIPTION "Spell checker for the message windows. Uses Hunspell to do the checking."
-#define __AUTHOR "Ricardo Pescuma Domenecci, FREAK_THEMIGHTY"
-#define __AUTHOREMAIL "pescuma@miranda-im.org"
+#define __AUTHOR "Ricardo Pescuma Domenecci, FREAK_THEMIGHTY"
+#define __AUTHOREMAIL "pescuma@miranda-im.org"
#define __AUTHORWEB "http://miranda-ng.org/p/SpellChecker/"
#define __COPYRIGHT "© 2006-2010 Ricardo Pescuma Domenecci"
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; |