From 61e43dca25a80a451cf2b7dbbc4931a8f2a96d80 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Fri, 20 Sep 2013 12:59:56 +0000 Subject: using Uxtheme git-svn-id: http://svn.miranda-ng.org/main/trunk@6137 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/AssocMgr/assocmgr_10.vcxproj | 8 ++++---- plugins/AssocMgr/assocmgr_11.vcxproj | 8 ++++---- plugins/AssocMgr/src/assoclist.cpp | 26 ++++++-------------------- plugins/AssocMgr/src/common.h | 1 + 4 files changed, 15 insertions(+), 28 deletions(-) (limited to 'plugins/AssocMgr') diff --git a/plugins/AssocMgr/assocmgr_10.vcxproj b/plugins/AssocMgr/assocmgr_10.vcxproj index ee378a59b7..1f1cae67d5 100644 --- a/plugins/AssocMgr/assocmgr_10.vcxproj +++ b/plugins/AssocMgr/assocmgr_10.vcxproj @@ -96,7 +96,7 @@ 0x24300000 false $(ProfileDir)..\..\bin10\lib - comctl32.lib;%(AdditionalDependencies) + comctl32.lib;UxTheme.lib;%(AdditionalDependencies) @@ -123,7 +123,7 @@ Windows $(IntDir)$(TargetName).lib 0x24300000 - comctl32.lib;%(AdditionalDependencies) + comctl32.lib;UxTheme.lib;%(AdditionalDependencies) false $(ProfileDir)..\..\bin10\lib @@ -152,7 +152,7 @@ Windows $(IntDir)$(TargetName).lib 0x24300000 - comctl32.lib;%(AdditionalDependencies) + comctl32.lib;UxTheme.lib;%(AdditionalDependencies) true true false @@ -184,7 +184,7 @@ Windows $(IntDir)$(TargetName).lib 0x24300000 - comctl32.lib;%(AdditionalDependencies) + comctl32.lib;UxTheme.lib;%(AdditionalDependencies) true true false diff --git a/plugins/AssocMgr/assocmgr_11.vcxproj b/plugins/AssocMgr/assocmgr_11.vcxproj index 6cc972d03e..484c01f6fa 100644 --- a/plugins/AssocMgr/assocmgr_11.vcxproj +++ b/plugins/AssocMgr/assocmgr_11.vcxproj @@ -100,7 +100,7 @@ 0x24300000 false $(ProfileDir)..\..\bin11\lib - comctl32.lib;%(AdditionalDependencies) + comctl32.lib;UxTheme.lib;%(AdditionalDependencies) false @@ -128,7 +128,7 @@ Windows $(IntDir)$(TargetName).lib 0x24300000 - comctl32.lib;%(AdditionalDependencies) + comctl32.lib;UxTheme.lib;%(AdditionalDependencies) false $(ProfileDir)..\..\bin11\lib @@ -157,7 +157,7 @@ Windows $(IntDir)$(TargetName).lib 0x24300000 - comctl32.lib;%(AdditionalDependencies) + comctl32.lib;UxTheme.lib;%(AdditionalDependencies) true true false @@ -188,7 +188,7 @@ Windows $(IntDir)$(TargetName).lib 0x24300000 - comctl32.lib;%(AdditionalDependencies) + comctl32.lib;UxTheme.lib;%(AdditionalDependencies) true true false diff --git a/plugins/AssocMgr/src/assoclist.cpp b/plugins/AssocMgr/src/assoclist.cpp index 310a396522..87daff26db 100644 --- a/plugins/AssocMgr/src/assoclist.cpp +++ b/plugins/AssocMgr/src/assoclist.cpp @@ -802,27 +802,13 @@ static INT_PTR CALLBACK AssocListOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara case WM_CTLCOLORSTATIC: /* use same text color for header as for group boxes (WinXP+) */ if(GetDlgCtrlID((HWND)lParam) == IDC_HEADERTEXT) { - HMODULE hUxThemeDLL; - HBRUSH hBrush; - hUxThemeDLL = LoadLibraryA("UXTHEME"); /* all ascii, already loaded */ lParam = (LPARAM)GetDlgItem(hwndDlg, IDC_MISCLABEL); - hBrush = (HBRUSH)SendMessage(hwndDlg, msg, wParam, lParam); - if(hUxThemeDLL!= NULL) { - HTHEME (WINAPI *pfnGetWindowTheme)(HWND); - HRESULT (WINAPI *pfnGetThemeColor)(HTHEME, int, int, int, COLORREF*); - COLORREF clr; - *(PROC*)&pfnGetWindowTheme = GetProcAddress(hUxThemeDLL, "GetWindowTheme"); - *(PROC*)&pfnGetThemeColor = GetProcAddress(hUxThemeDLL, "GetThemeColor"); - if(pfnGetWindowTheme!= NULL && pfnGetThemeColor!= NULL) { - HTHEME hTheme; - hTheme = pfnGetWindowTheme((HWND)lParam); - if(hTheme!= NULL) - if (!pfnGetThemeColor(hTheme, BP_GROUPBOX, GBS_NORMAL, TMT_TEXTCOLOR, &clr)) { - SetBkMode((HDC)wParam, TRANSPARENT); - SetTextColor((HDC)wParam, clr); - } - } - FreeLibrary(hUxThemeDLL); + HBRUSH hBrush = (HBRUSH)SendMessage(hwndDlg, msg, wParam, lParam); + COLORREF clr; + HTHEME hTheme = GetWindowTheme((HWND)lParam); + if(hTheme!= NULL && !GetThemeColor(hTheme, BP_GROUPBOX, GBS_NORMAL, TMT_TEXTCOLOR, &clr)) { + SetBkMode((HDC)wParam, TRANSPARENT); + SetTextColor((HDC)wParam, clr); } return (BOOL)hBrush; } diff --git a/plugins/AssocMgr/src/common.h b/plugins/AssocMgr/src/common.h index 443e562e29..c7ea172927 100644 --- a/plugins/AssocMgr/src/common.h +++ b/plugins/AssocMgr/src/common.h @@ -24,6 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include /* for SHChangeNotify() */ #include #include +#include #include #include -- cgit v1.2.3