diff options
Diffstat (limited to 'plugins/AssocMgr/src')
-rw-r--r-- | plugins/AssocMgr/src/assoclist.cpp | 26 | ||||
-rw-r--r-- | plugins/AssocMgr/src/common.h | 1 |
2 files changed, 7 insertions, 20 deletions
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>
|