From cc5d86298b7082a549216ca2c389b388c36eeddc Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sun, 9 Aug 2015 14:58:03 +0000 Subject: fixed underline color in win10 git-svn-id: http://svn.miranda-ng.org/main/trunk@14883 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SpellChecker/src/utils.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/plugins/SpellChecker/src/utils.cpp b/plugins/SpellChecker/src/utils.cpp index 83884c35ae..0baf6bc842 100644 --- a/plugins/SpellChecker/src/utils.cpp +++ b/plugins/SpellChecker/src/utils.cpp @@ -35,19 +35,7 @@ void SetUnderline(Dialog *dlg, int pos_start, int pos_end) cf.dwEffects = CFE_UNDERLINE; cf.bUnderlineType = opts.underline_type + CFU_UNDERLINEDOUBLE; - 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) + if (IsWinVer8Plus()) cf.bUnderlineColor = 0x06; else cf.bUnderlineColor = 0x05; @@ -1063,7 +1051,7 @@ void AppendMenuItem(HMENU hMenu, int id, TCHAR *name, HICON hIcon, BOOL checked) GetIconInfo(hIcon, &iconInfo); MENUITEMINFO mii = { 0 }; - mii.cbSize = sizeof(mii); + mii.cbSize = sizeof(mii); mii.fMask = MIIM_CHECKMARKS | MIIM_TYPE | MIIM_STATE; mii.fType = MFT_STRING; mii.fState = (checked ? MFS_CHECKED : 0); -- cgit v1.2.3