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/AutoShutdown/shutdown_10.vcxproj | 13 ++++--------- plugins/AutoShutdown/shutdown_11.vcxproj | 8 ++++---- plugins/AutoShutdown/src/common.h | 1 + plugins/AutoShutdown/src/frame.cpp | 15 +++------------ 4 files changed, 12 insertions(+), 25 deletions(-) (limited to 'plugins/AutoShutdown') diff --git a/plugins/AutoShutdown/shutdown_10.vcxproj b/plugins/AutoShutdown/shutdown_10.vcxproj index 6a1772d787..1c9a7e9cb2 100644 --- a/plugins/AutoShutdown/shutdown_10.vcxproj +++ b/plugins/AutoShutdown/shutdown_10.vcxproj @@ -94,7 +94,7 @@ Windows $(IntDir)$(TargetName).lib 0x11070000 - comctl32.lib;%(AdditionalDependencies) + comctl32.lib;UxTheme.lib;%(AdditionalDependencies) false $(ProfileDir)..\..\bin10\lib @@ -122,7 +122,7 @@ Windows $(IntDir)$(TargetName).lib 0x11070000 - comctl32.lib;%(AdditionalDependencies) + comctl32.lib;UxTheme.lib;%(AdditionalDependencies) false $(ProfileDir)..\..\bin10\lib @@ -155,7 +155,7 @@ true false $(ProfileDir)..\..\bin10\lib - comctl32.lib;%(AdditionalDependencies) + comctl32.lib;UxTheme.lib;%(AdditionalDependencies) /PDBALTPATH:%_PDB% @@ -183,7 +183,7 @@ Windows $(IntDir)$(TargetName).lib 0x11070000 - comctl32.lib;%(AdditionalDependencies) + comctl32.lib;UxTheme.lib;%(AdditionalDependencies) true true false @@ -220,11 +220,6 @@ - - - - - diff --git a/plugins/AutoShutdown/shutdown_11.vcxproj b/plugins/AutoShutdown/shutdown_11.vcxproj index 34bcb3d692..aeef88602a 100644 --- a/plugins/AutoShutdown/shutdown_11.vcxproj +++ b/plugins/AutoShutdown/shutdown_11.vcxproj @@ -98,7 +98,7 @@ Windows $(IntDir)$(TargetName).lib 0x11070000 - comctl32.lib;%(AdditionalDependencies) + comctl32.lib;UxTheme.lib;%(AdditionalDependencies) false $(ProfileDir)..\..\bin11\lib false @@ -127,7 +127,7 @@ Windows $(IntDir)$(TargetName).lib 0x11070000 - comctl32.lib;%(AdditionalDependencies) + comctl32.lib;UxTheme.lib;%(AdditionalDependencies) false $(ProfileDir)..\..\bin11\lib @@ -160,7 +160,7 @@ true false $(ProfileDir)..\..\bin11\lib - comctl32.lib;%(AdditionalDependencies) + comctl32.lib;UxTheme.lib;%(AdditionalDependencies) @@ -187,7 +187,7 @@ Windows $(IntDir)$(TargetName).lib 0x11070000 - comctl32.lib;%(AdditionalDependencies) + comctl32.lib;UxTheme.lib;%(AdditionalDependencies) true true false diff --git a/plugins/AutoShutdown/src/common.h b/plugins/AutoShutdown/src/common.h index fba4f10304..8752f1d0aa 100644 --- a/plugins/AutoShutdown/src/common.h +++ b/plugins/AutoShutdown/src/common.h @@ -21,6 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include /* for mktime(),time() */ #include +#include /* WinXP+: shutdown reason codes */ #if defined(EWX_RESTARTAPPS) /* new MS Platform SDK */ 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; } -- cgit v1.2.3