summaryrefslogtreecommitdiff
path: root/plugins/AutoShutdown/src/frame.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-09-20 12:59:56 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-09-20 12:59:56 +0000
commit61e43dca25a80a451cf2b7dbbc4931a8f2a96d80 (patch)
treef7e3b3172aac403c678a71bdfb783358609c8119 /plugins/AutoShutdown/src/frame.cpp
parent4e2b9eef0d9a530b633c69cfa03ee43359c3a213 (diff)
using Uxtheme
git-svn-id: http://svn.miranda-ng.org/main/trunk@6137 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/AutoShutdown/src/frame.cpp')
-rw-r--r--plugins/AutoShutdown/src/frame.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/plugins/AutoShutdown/src/frame.cpp b/plugins/AutoShutdown/src/frame.cpp
index 30c356812e..3e8262d7fa 100644
--- a/plugins/AutoShutdown/src/frame.cpp
+++ b/plugins/AutoShutdown/src/frame.cpp
@@ -588,25 +588,16 @@ static int FrameModulesLoaded(WPARAM wParam,LPARAM lParam)
{
if(ServiceExists(MS_CLIST_FRAMES_ADDFRAME)) {
LOGFONT lf;
- COLORREF clr;
- HMODULE hUxThemeDLL;
- BOOL (WINAPI *pfnIsThemeActive)(VOID);
/* built-in font module is not available before this hook */
- clr=GetDefaultColor(FRAMEELEMENT_TEXT);
+ COLORREF clr = GetDefaultColor(FRAMEELEMENT_TEXT);
FontService_RegisterFont("AutoShutdown","CountdownFont",LPGENT("Automatic Shutdown"),LPGENT("Countdown on Frame"),LPGENT("Automatic Shutdown"),LPGENT("Background"),0,FALSE,GetDefaultFont(&lf),clr);
clr=GetDefaultColor(FRAMEELEMENT_BKGRND);
FontService_RegisterColor("AutoShutdown","BkgColor",LPGENT("Automatic Shutdown"),LPGENT("Background"),clr);
- /* progressbar color can only be changed in windows classic theme */
- /* FIXME: should be registered/unregistered on WM_THEMECHANGED/ME_OPT_INITIALISE msg,
- * currently not possible as no such font service exists */
- hUxThemeDLL=LoadLibraryA("UXTHEME"); /* all ascii */
- *(PROC*)&pfnIsThemeActive=(hUxThemeDLL!=NULL)?GetProcAddress(hUxThemeDLL,"IsThemeActive"):NULL;
- if(pfnIsThemeActive==NULL || !pfnIsThemeActive()) {
+ if( !IsThemeActive()) {
/* progressbar color can only be changed with classic theme */
- clr=GetDefaultColor(FRAMEELEMENT_BAR);
+ clr=GetDefaultColor(FRAMEELEMENT_BAR);
FontService_RegisterColor("AutoShutdown","ProgressColor",TranslateT("Automatic Shutdown"),TranslateT("Progress Bar"),clr);
}
- if(hUxThemeDLL!=NULL) FreeLibrary(hUxThemeDLL);
}
return 0;
}