diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2013-09-20 12:59:56 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-09-20 12:59:56 +0000 |
commit | 61e43dca25a80a451cf2b7dbbc4931a8f2a96d80 (patch) | |
tree | f7e3b3172aac403c678a71bdfb783358609c8119 /plugins/AssocMgr | |
parent | 4e2b9eef0d9a530b633c69cfa03ee43359c3a213 (diff) |
using Uxtheme
git-svn-id: http://svn.miranda-ng.org/main/trunk@6137 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/AssocMgr')
-rw-r--r-- | plugins/AssocMgr/assocmgr_10.vcxproj | 8 | ||||
-rw-r--r-- | plugins/AssocMgr/assocmgr_11.vcxproj | 8 | ||||
-rw-r--r-- | plugins/AssocMgr/src/assoclist.cpp | 26 | ||||
-rw-r--r-- | plugins/AssocMgr/src/common.h | 1 |
4 files changed, 15 insertions, 28 deletions
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 @@ <BaseAddress>0x24300000</BaseAddress>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\bin10\lib</AdditionalLibraryDirectories>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -123,7 +123,7 @@ <SubSystem>Windows</SubSystem>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<BaseAddress>0x24300000</BaseAddress>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\bin10\lib</AdditionalLibraryDirectories>
</Link>
@@ -152,7 +152,7 @@ <SubSystem>Windows</SubSystem>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<BaseAddress>0x24300000</BaseAddress>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -184,7 +184,7 @@ <SubSystem>Windows</SubSystem>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<BaseAddress>0x24300000</BaseAddress>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
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 @@ <BaseAddress>0x24300000</BaseAddress>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\bin11\lib</AdditionalLibraryDirectories>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
</ItemDefinitionGroup>
@@ -128,7 +128,7 @@ <SubSystem>Windows</SubSystem>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<BaseAddress>0x24300000</BaseAddress>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\bin11\lib</AdditionalLibraryDirectories>
</Link>
@@ -157,7 +157,7 @@ <SubSystem>Windows</SubSystem>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<BaseAddress>0x24300000</BaseAddress>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -188,7 +188,7 @@ <SubSystem>Windows</SubSystem>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<BaseAddress>0x24300000</BaseAddress>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
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 <shlobj.h> /* for SHChangeNotify() */
#include <Vssym32.h>
#include <malloc.h>
+#include <Uxtheme.h>
#include <newpluginapi.h>
#include <m_database.h>
|