summaryrefslogtreecommitdiff
path: root/plugins/SpellChecker
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-01-03 09:58:04 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-01-03 09:58:04 +0000
commitf4c08e94a72ecc7d147c6e760ed76e33e38f3f84 (patch)
tree4a7f20d725f0d3be866c778a3c336eb765811a28 /plugins/SpellChecker
parent37f09f5b29740466acd03cbf3c51fd215622744c (diff)
SpellCheker:
fix for red underline color Crasgdumper: fix for win 8.1 detect git-svn-id: http://svn.miranda-ng.org/main/trunk@11732 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SpellChecker')
-rw-r--r--plugins/SpellChecker/src/utils.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/plugins/SpellChecker/src/utils.cpp b/plugins/SpellChecker/src/utils.cpp
index b812ff3346..c784e56b44 100644
--- a/plugins/SpellChecker/src/utils.cpp
+++ b/plugins/SpellChecker/src/utils.cpp
@@ -34,7 +34,24 @@ void SetUnderline(Dialog *dlg, int pos_start, int pos_end)
cf.dwMask = CFM_UNDERLINE | CFM_UNDERLINETYPE;
cf.dwEffects = CFE_UNDERLINE;
cf.bUnderlineType = opts.underline_type + CFU_UNDERLINEDOUBLE;
- cf.bUnderlineColor = 0x05;
+
+ OSVERSIONINFOEX osvi = { 0 };
+ BOOL bOsVersionInfoEx;
+
+ osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
+
+ bOsVersionInfoEx = GetVersionEx((OSVERSIONINFO*)&osvi);
+ if (!bOsVersionInfoEx) {
+ osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+ if (!GetVersionEx((OSVERSIONINFO*)&osvi))
+ return;
+ }
+
+ if (VER_PLATFORM_WIN32_NT == osvi.dwPlatformId && osvi.dwMajorVersion == 6 && osvi.dwMinorVersion >= 2)
+ cf.bUnderlineColor = 0x06;
+ else
+ cf.bUnderlineColor = 0x05;
+
dlg->re->SendMessage(EM_SETCHARFORMAT, (WPARAM)SCF_SELECTION, (LPARAM)&cf);
dlg->markedSomeWord = TRUE;