summaryrefslogtreecommitdiff
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
parent4e2b9eef0d9a530b633c69cfa03ee43359c3a213 (diff)
using Uxtheme
git-svn-id: http://svn.miranda-ng.org/main/trunk@6137 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/AssocMgr/assocmgr_10.vcxproj8
-rw-r--r--plugins/AssocMgr/assocmgr_11.vcxproj8
-rw-r--r--plugins/AssocMgr/src/assoclist.cpp26
-rw-r--r--plugins/AssocMgr/src/common.h1
-rw-r--r--plugins/AutoShutdown/shutdown_10.vcxproj13
-rw-r--r--plugins/AutoShutdown/shutdown_11.vcxproj8
-rw-r--r--plugins/AutoShutdown/src/common.h1
-rw-r--r--plugins/AutoShutdown/src/frame.cpp15
-rw-r--r--plugins/Clist_mw/clist_mw_10.vcxproj8
-rw-r--r--plugins/Clist_mw/clist_mw_11.vcxproj8
-rw-r--r--plugins/Clist_mw/src/clcpaint.cpp37
-rw-r--r--plugins/Clist_mw/src/commonheaders.h1
-rw-r--r--plugins/FTPFileYM/ftpfile_10.vcxproj8
-rw-r--r--plugins/FTPFileYM/ftpfile_11.vcxproj8
-rw-r--r--plugins/FTPFileYM/src/dialog.cpp3
-rw-r--r--plugins/FTPFileYM/src/ftpfile.cpp8
-rw-r--r--plugins/FTPFileYM/src/manager.cpp2
-rw-r--r--plugins/IEView/src/Options.cpp9
-rw-r--r--plugins/LangMan/langman_10.vcxproj8
-rw-r--r--plugins/LangMan/langman_11.vcxproj8
-rw-r--r--plugins/LangMan/src/common.h1
-rw-r--r--plugins/LangMan/src/options.cpp36
-rw-r--r--plugins/Popup/Popup_10.vcxproj8
-rw-r--r--plugins/Popup/Popup_11.vcxproj8
-rw-r--r--plugins/Popup/src/actions.cpp13
-rw-r--r--plugins/Popup/src/headers.h1
-rw-r--r--plugins/Popup/src/opt_contacts.cpp3
-rw-r--r--plugins/Popup/src/opt_gen.cpp15
-rw-r--r--plugins/Popup/src/opt_skins.cpp6
-rw-r--r--plugins/Popup/src/popup_wnd2.cpp80
30 files changed, 123 insertions, 236 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>
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 @@
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<BaseAddress>0x11070000</BaseAddress>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\bin10\lib</AdditionalLibraryDirectories>
</Link>
@@ -122,7 +122,7 @@
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<BaseAddress>0x11070000</BaseAddress>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\bin10\lib</AdditionalLibraryDirectories>
</Link>
@@ -155,7 +155,7 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\bin10\lib</AdditionalLibraryDirectories>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalOptions>/PDBALTPATH:%_PDB%</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
@@ -183,7 +183,7 @@
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<BaseAddress>0x11070000</BaseAddress>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -220,11 +220,6 @@
<ResourceCompile Include="res\resource.rc" />
<ResourceCompile Include="res\version.rc" />
</ItemGroup>
- <ItemGroup>
- <None Include="res\active.ico" />
- <None Include="res\header.ico" />
- <None Include="res\inactive.ico" />
- </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
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 @@
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<BaseAddress>0x11070000</BaseAddress>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\bin11\lib</AdditionalLibraryDirectories>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
@@ -127,7 +127,7 @@
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<BaseAddress>0x11070000</BaseAddress>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\bin11\lib</AdditionalLibraryDirectories>
</Link>
@@ -160,7 +160,7 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\bin11\lib</AdditionalLibraryDirectories>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -187,7 +187,7 @@
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<BaseAddress>0x11070000</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/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 <time.h> /* for mktime(),time() */
#include <windows.h>
+#include <Uxtheme.h>
/* 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;
}
diff --git a/plugins/Clist_mw/clist_mw_10.vcxproj b/plugins/Clist_mw/clist_mw_10.vcxproj
index c9c75c0066..c15757ac30 100644
--- a/plugins/Clist_mw/clist_mw_10.vcxproj
+++ b/plugins/Clist_mw/clist_mw_10.vcxproj
@@ -89,7 +89,7 @@
<AdditionalIncludeDirectories>..\..\include;..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<BaseAddress>0x6590000</BaseAddress>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -118,7 +118,7 @@
<AdditionalIncludeDirectories>..\..\include;..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27*%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<BaseAddress>0x6590000</BaseAddress>
@@ -149,7 +149,7 @@
<AdditionalIncludeDirectories>..\..\include;..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27X86%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<OptimizeReferences>true</OptimizeReferences>
@@ -183,7 +183,7 @@
<AdditionalIncludeDirectories>..\..\include;..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27*%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<OptimizeReferences>true</OptimizeReferences>
diff --git a/plugins/Clist_mw/clist_mw_11.vcxproj b/plugins/Clist_mw/clist_mw_11.vcxproj
index 60e979e3e7..6f33fd2410 100644
--- a/plugins/Clist_mw/clist_mw_11.vcxproj
+++ b/plugins/Clist_mw/clist_mw_11.vcxproj
@@ -93,7 +93,7 @@
<AdditionalIncludeDirectories>..\..\include;..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<BaseAddress>0x6590000</BaseAddress>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -123,7 +123,7 @@
<AdditionalIncludeDirectories>..\..\include;..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27*%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<BaseAddress>0x6590000</BaseAddress>
@@ -154,7 +154,7 @@
<AdditionalIncludeDirectories>..\..\include;..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27X86%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<OptimizeReferences>true</OptimizeReferences>
@@ -187,7 +187,7 @@
<AdditionalIncludeDirectories>..\..\include;..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27*%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<OptimizeReferences>true</OptimizeReferences>
diff --git a/plugins/Clist_mw/src/clcpaint.cpp b/plugins/Clist_mw/src/clcpaint.cpp
index f34c98e8ac..b08e989b06 100644
--- a/plugins/Clist_mw/src/clcpaint.cpp
+++ b/plugins/Clist_mw/src/clcpaint.cpp
@@ -135,12 +135,6 @@ static int GetRealStatus(struct ClcContact * contact, int status)
return status;
}
-static HMODULE themeAPIHandle = NULL; // handle to uxtheme.dll
-static HANDLE (WINAPI *MyOpenThemeData)(HWND,LPCWSTR);
-static HRESULT (WINAPI *MyCloseThemeData)(HANDLE);
-static HRESULT (WINAPI *MyDrawThemeBackground)(HANDLE,HDC,int,int,const RECT *,const RECT *);
-
-#define MGPROC(x) GetProcAddress(themeAPIHandle,x)
void InternalPaintClc(HWND hwnd,struct ClcData *dat,HDC hdc,RECT *rcPaint)
{
HDC hdcMem;
@@ -381,37 +375,14 @@ void InternalPaintClc(HWND hwnd,struct ClcData *dat,HDC hdc,RECT *rcPaint)
//checkboxes
if (checkboxWidth && (subindex == -1 ||1)) {
RECT rc;
- HANDLE hTheme = NULL;
-
- // THEME
- if (IsWinVerXPPlus()) {
- if ( !themeAPIHandle) {
- themeAPIHandle = GetModuleHandleA("uxtheme");
- if (themeAPIHandle) {
- MyOpenThemeData = (HANDLE (WINAPI *)(HWND,LPCWSTR))MGPROC("OpenThemeData");
- MyCloseThemeData = (HRESULT (WINAPI *)(HANDLE))MGPROC("CloseThemeData");
- MyDrawThemeBackground = (HRESULT (WINAPI *)(HANDLE,HDC,int,int,const RECT *,const RECT *))MGPROC("DrawThemeBackground");
- }
- }
- // Make sure all of these methods are valid (i would hope either all or none work)
- if (MyOpenThemeData
- &&MyCloseThemeData
- &&MyDrawThemeBackground) {
- hTheme = MyOpenThemeData(hwnd,L"BUTTON");
- }
- }
+ HANDLE hTheme = OpenThemeData(hwnd,L"BUTTON");
+
rc.left = dat->leftMargin+indent*dat->groupIndent+subident;
rc.right = rc.left+dat->checkboxSize;
rc.top = y+((dat->rowHeight-dat->checkboxSize)>>1);
rc.bottom = rc.top+dat->checkboxSize;
- if (hTheme) {
- MyDrawThemeBackground(hTheme, hdcMem, BP_CHECKBOX, Drawing->flags&CONTACTF_CHECKED?(hottrack?CBS_CHECKEDHOT:CBS_CHECKEDNORMAL):(hottrack?CBS_UNCHECKEDHOT:CBS_UNCHECKEDNORMAL), &rc, &rc);
- }
- else DrawFrameControl(hdcMem,&rc,DFC_BUTTON,DFCS_BUTTONCHECK|DFCS_FLAT|(Drawing->flags&CONTACTF_CHECKED?DFCS_CHECKED:0)|(hottrack?DFCS_HOT:0));
- if (hTheme&&MyCloseThemeData) {
- MyCloseThemeData(hTheme);
- hTheme = NULL;
- }
+ DrawThemeBackground(hTheme, hdcMem, BP_CHECKBOX, Drawing->flags&CONTACTF_CHECKED?(hottrack?CBS_CHECKEDHOT:CBS_CHECKEDNORMAL):(hottrack?CBS_UNCHECKEDHOT:CBS_UNCHECKEDNORMAL), &rc, &rc);
+ CloseThemeData(hTheme);
}
//icon
diff --git a/plugins/Clist_mw/src/commonheaders.h b/plugins/Clist_mw/src/commonheaders.h
index b26ebe94a9..2aecdd67d3 100644
--- a/plugins/Clist_mw/src/commonheaders.h
+++ b/plugins/Clist_mw/src/commonheaders.h
@@ -29,6 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <windows.h>
#include <vssym32.h>
+#include <Uxtheme.h>
#include <malloc.h>
#include <stddef.h>
diff --git a/plugins/FTPFileYM/ftpfile_10.vcxproj b/plugins/FTPFileYM/ftpfile_10.vcxproj
index 2f6ca4c93d..d5a50c9fdf 100644
--- a/plugins/FTPFileYM/ftpfile_10.vcxproj
+++ b/plugins/FTPFileYM/ftpfile_10.vcxproj
@@ -82,7 +82,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
</ClCompile>
<Link>
- <AdditionalDependencies>wldap32.lib;ws2_32.lib;winmm.lib;libcurl32.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>wldap32.lib;ws2_32.lib;winmm.lib;UxTheme.lib;libcurl32.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\bin10\lib</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
@@ -110,7 +110,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
</ClCompile>
<Link>
- <AdditionalDependencies>wldap32.lib;ws2_32.lib;winmm.lib;libcurl64.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>wldap32.lib;ws2_32.lib;winmm.lib;UxTheme.lib;libcurl64.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\bin10\lib</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
@@ -139,7 +139,7 @@
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
- <AdditionalDependencies>wldap32.lib;ws2_32.lib;winmm.lib;libcurld32.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>wldap32.lib;ws2_32.lib;winmm.lib;UxTheme.lib;libcurld32.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\bin10\lib</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
@@ -164,7 +164,7 @@
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
- <AdditionalDependencies>wldap32.lib;ws2_32.lib;winmm.lib;libcurld64.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>wldap32.lib;ws2_32.lib;winmm.lib;UxTheme.lib;libcurld64.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\bin10\lib</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
diff --git a/plugins/FTPFileYM/ftpfile_11.vcxproj b/plugins/FTPFileYM/ftpfile_11.vcxproj
index c693bb3e3e..42190a72a6 100644
--- a/plugins/FTPFileYM/ftpfile_11.vcxproj
+++ b/plugins/FTPFileYM/ftpfile_11.vcxproj
@@ -86,7 +86,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
</ClCompile>
<Link>
- <AdditionalDependencies>wldap32.lib;ws2_32.lib;winmm.lib;libcurl32.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>wldap32.lib;ws2_32.lib;winmm.lib;UxTheme.lib;libcurl32.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\bin11\lib</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
@@ -113,7 +113,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
</ClCompile>
<Link>
- <AdditionalDependencies>wldap32.lib;ws2_32.lib;winmm.lib;libcurl64.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>wldap32.lib;ws2_32.lib;winmm.lib;UxTheme.lib;libcurl64.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\bin11\lib</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
@@ -141,7 +141,7 @@
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
- <AdditionalDependencies>wldap32.lib;ws2_32.lib;winmm.lib;libcurld32.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>wldap32.lib;ws2_32.lib;winmm.lib;UxTheme.lib;libcurld32.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\bin11\lib</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
@@ -167,7 +167,7 @@
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
- <AdditionalDependencies>wldap32.lib;ws2_32.lib;winmm.lib;libcurld64.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>wldap32.lib;ws2_32.lib;winmm.lib;UxTheme.lib;libcurld64.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\bin11\lib</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
diff --git a/plugins/FTPFileYM/src/dialog.cpp b/plugins/FTPFileYM/src/dialog.cpp
index 20cbeb3105..376dd204b1 100644
--- a/plugins/FTPFileYM/src/dialog.cpp
+++ b/plugins/FTPFileYM/src/dialog.cpp
@@ -24,13 +24,12 @@ UploadDialog *uDlg = NULL;
Mutex UploadDialog::mutexTabs;
extern Options &opt;
-extern BOOL (WINAPI *MyEnableThemeDialogTexture)(HANDLE, DWORD);
UploadDialog::UploadDialog()
{
this->hwnd = CreateDialog(hInst, MAKEINTRESOURCE(IDD_DLG_UPLOAD), 0, UploadDlgProc);
this->hwndTabs = GetDlgItem(this->hwnd, IDC_TAB);
- MyEnableThemeDialogTexture(this->hwnd, ETDT_ENABLETAB);
+ EnableThemeDialogTexture(this->hwnd, ETDT_ENABLETAB);
MONITORINFO mi = {0};
mi.cbSize = sizeof(mi);
diff --git a/plugins/FTPFileYM/src/ftpfile.cpp b/plugins/FTPFileYM/src/ftpfile.cpp
index 2ae9808654..225a1c6d82 100644
--- a/plugins/FTPFileYM/src/ftpfile.cpp
+++ b/plugins/FTPFileYM/src/ftpfile.cpp
@@ -32,7 +32,6 @@ extern DeleteTimer &deleteTimer;
extern ServerList &ftpList;
extern Options &opt;
-BOOL (WINAPI *MyEnableThemeDialogTexture)(HANDLE, DWORD) = 0;
int PrebuildContactMenu(WPARAM wParam, LPARAM lParam);
void PrebuildMainMenu();
int TabsrmmButtonPressed(WPARAM wParam, LPARAM lParam);
@@ -478,13 +477,6 @@ extern "C" int __declspec(dllexport) Load(void)
hServiceMainMenu = CreateServiceFunction(MS_FTPFILE_MAINMENU, MainMenuService);
hServiceShareFile = CreateServiceFunction(MS_FTPFILE_SHAREFILE, ShareFileService);
- if (IsWinVerXPPlus())
- {
- HMODULE hUxTheme = GetModuleHandle(_T("uxtheme.dll"));
- if (hUxTheme)
- MyEnableThemeDialogTexture = (BOOL (WINAPI *)(HANDLE, DWORD))GetProcAddress(hUxTheme, "EnableThemeDialogTexture");
- }
-
opt.loadOptions();
deleteTimer.init();
ftpList.init();
diff --git a/plugins/FTPFileYM/src/manager.cpp b/plugins/FTPFileYM/src/manager.cpp
index 3befc801ce..13b8a8cd82 100644
--- a/plugins/FTPFileYM/src/manager.cpp
+++ b/plugins/FTPFileYM/src/manager.cpp
@@ -75,7 +75,7 @@ void Manager::initImageList()
{
char buff[256];
- this->himlStates = ImageList_Create(16, 16, IsWinVerXPPlus() ? ILC_COLOR32 | ILC_MASK : ILC_COLOR8 | ILC_MASK, ServerList::FTP_COUNT + 4, 0);
+ this->himlStates = ImageList_Create(16, 16, ILC_COLOR32 | ILC_MASK, ServerList::FTP_COUNT + 4, 0);
ImageList_AddIcon(himlStates, LoadSkinnedIcon(SKINICON_OTHER_DELETE)); // image index 0 is useless for INDEXTOSTATEIMAGEMASK
ImageList_AddIcon(himlStates, LoadSkinnedIcon(SKINICON_OTHER_DELETE));
ImageList_AddIcon(himlStates, LoadSkinnedIcon(SKINICON_OTHER_NOTICK));
diff --git a/plugins/IEView/src/Options.cpp b/plugins/IEView/src/Options.cpp
index 2f8adeb013..d5df0ca6c3 100644
--- a/plugins/IEView/src/Options.cpp
+++ b/plugins/IEView/src/Options.cpp
@@ -33,7 +33,6 @@ static ProtocolSettings *chatCurrentProtoItem = NULL;
static ProtocolSettings *historyCurrentProtoItem = NULL;
static HIMAGELIST hProtocolImageList = NULL;
static HIMAGELIST hImageList = NULL;
-static BOOL (WINAPI *pfnEnableThemeDialogTexture)(HANDLE, DWORD) = 0;
struct
{
@@ -1472,14 +1471,6 @@ void Options::init()
isInited = true;
DBVARIANT dbv;
- HMODULE hUxTheme = 0;
- if(IsWinVerXPPlus()) {
- hUxTheme = GetModuleHandle(_T("uxtheme.dll"));
- if(hUxTheme)
- pfnEnableThemeDialogTexture = (BOOL (WINAPI *)(HANDLE, DWORD))GetProcAddress(hUxTheme, "EnableThemeDialogTexture");
- }
-
-
generalFlags = db_get_dw(NULL, ieviewModuleName, DBS_BASICFLAGS, 13);
/* TODO: move to buildProtocolList method */
diff --git a/plugins/LangMan/langman_10.vcxproj b/plugins/LangMan/langman_10.vcxproj
index 54cd7cf6de..05fd96e8be 100644
--- a/plugins/LangMan/langman_10.vcxproj
+++ b/plugins/LangMan/langman_10.vcxproj
@@ -88,7 +88,7 @@
<AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<BaseAddress>0x24100000</BaseAddress>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -114,7 +114,7 @@
<AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<BaseAddress>0x24100000</BaseAddress>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -145,7 +145,7 @@
<AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<BaseAddress>0x24100000</BaseAddress>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -178,7 +178,7 @@
<AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<BaseAddress>0x24100000</BaseAddress>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
diff --git a/plugins/LangMan/langman_11.vcxproj b/plugins/LangMan/langman_11.vcxproj
index 0402b3ec9f..ce63787cdd 100644
--- a/plugins/LangMan/langman_11.vcxproj
+++ b/plugins/LangMan/langman_11.vcxproj
@@ -92,7 +92,7 @@
<AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<BaseAddress>0x24100000</BaseAddress>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -119,7 +119,7 @@
<AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<BaseAddress>0x24100000</BaseAddress>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -150,7 +150,7 @@
<AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<BaseAddress>0x24100000</BaseAddress>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -182,7 +182,7 @@
<AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<BaseAddress>0x24100000</BaseAddress>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
diff --git a/plugins/LangMan/src/common.h b/plugins/LangMan/src/common.h
index cc0e8c041f..d3cd0a1397 100644
--- a/plugins/LangMan/src/common.h
+++ b/plugins/LangMan/src/common.h
@@ -24,6 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <windows.h>
#include <ShlObj.h>
#include <vsstyle.h>
+#include <Uxtheme.h>
#include <newpluginapi.h>
#include <m_langpack.h>
diff --git a/plugins/LangMan/src/options.cpp b/plugins/LangMan/src/options.cpp
index 2420509699..f7eaac87c7 100644
--- a/plugins/LangMan/src/options.cpp
+++ b/plugins/LangMan/src/options.cpp
@@ -39,12 +39,6 @@ static HIMAGELIST CreateRadioImages(COLORREF clrBk, COLORREF clrText)
HBITMAP hbm, hbmPrev;
HIMAGELIST himl = NULL;
- /* the WinXP+ themed way */
- HTHEME (WINAPI *pfnOpenThemeData)(HWND, const WCHAR*);
- HTHEME (WINAPI *pfnCloseThemeData)(HTHEME);
- HRESULT (WINAPI *pfnDrawThemeBackground)(HTHEME, HDC, int, int, const RECT*, const RECT*);
- HMODULE hUxThemeDLL = LoadLibrary(_T("UXTHEME")); /* all ascii */
-
/* draw bitmap */
hdcScreen = GetDC(NULL);
if (hdcScreen!=NULL) {
@@ -57,27 +51,16 @@ static HIMAGELIST CreateRadioImages(COLORREF clrBk, COLORREF clrText)
if (hbm!=NULL) {
hbmPrev = (HBITMAP)SelectObject(hdc, hbm);
if (hbmPrev!=NULL) { /* error on select? */
- /* the WinXP+ themed way */
- if (hUxThemeDLL!=NULL) {
- *(PROC*)&pfnOpenThemeData = GetProcAddress(hUxThemeDLL, "OpenThemeData");
- *(PROC*)&pfnCloseThemeData = GetProcAddress(hUxThemeDLL, "CloseThemeData");
- *(PROC*)&pfnDrawThemeBackground = GetProcAddress(hUxThemeDLL, "DrawThemeBackground");
- if (pfnOpenThemeData!=NULL && pfnCloseThemeData!=NULL && pfnDrawThemeBackground!=NULL) {
- HTHEME hTheme;
- hTheme = pfnOpenThemeData(NULL, L"Button");
- if (hTheme!=NULL) {
- SetRect(&rc, 0, 0, size.cx, size.cy);
- /* unchecked */
- if (!pfnDrawThemeBackground(hTheme, hdc, BP_RADIOBUTTON, RBS_UNCHECKEDNORMAL, &rc, NULL)) {
- /* checked */
- OffsetRect(&rc, size.cx, 0);
- if (!pfnDrawThemeBackground(hTheme, hdc, BP_RADIOBUTTON, RBS_CHECKEDNORMAL, &rc, NULL))
- himl = ImageList_Create(size.cx, size.cy, ILC_COLOR32|ILC_MASK, 3, 0);
- }
- pfnCloseThemeData(hTheme);
- }
- }
+ HTHEME hTheme = OpenThemeData(NULL, L"Button");
+ SetRect(&rc, 0, 0, size.cx, size.cy);
+ /* unchecked */
+ if (!DrawThemeBackground(hTheme, hdc, BP_RADIOBUTTON, RBS_UNCHECKEDNORMAL, &rc, NULL)) {
+ /* checked */
+ OffsetRect(&rc, size.cx, 0);
+ if (!DrawThemeBackground(hTheme, hdc, BP_RADIOBUTTON, RBS_CHECKEDNORMAL, &rc, NULL))
+ himl = ImageList_Create(size.cx, size.cy, ILC_COLOR32|ILC_MASK, 3, 0);
}
+ CloseThemeData(hTheme);
/* the classic way */
if (himl == NULL) {
register HDC hdcMono;
@@ -144,7 +127,6 @@ static HIMAGELIST CreateRadioImages(COLORREF clrBk, COLORREF clrText)
ReleaseDC(NULL, hdcScreen);
}
- if (hUxThemeDLL!=NULL) FreeLibrary(hUxThemeDLL);
return himl;
}
diff --git a/plugins/Popup/Popup_10.vcxproj b/plugins/Popup/Popup_10.vcxproj
index 3270d08192..367350020f 100644
--- a/plugins/Popup/Popup_10.vcxproj
+++ b/plugins/Popup/Popup_10.vcxproj
@@ -85,7 +85,7 @@
<AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>msimg32.lib;gdiplus.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>msimg32.lib;gdiplus.lib;comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<BaseAddress>0x55550000</BaseAddress>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -109,7 +109,7 @@
<AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>msimg32.lib;gdiplus.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>msimg32.lib;gdiplus.lib;comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<BaseAddress>0x55550000</BaseAddress>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -136,7 +136,7 @@
<AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>msimg32.lib;gdiplus.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>msimg32.lib;gdiplus.lib;comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<BaseAddress>0x55550000</BaseAddress>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -166,7 +166,7 @@
<AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>msimg32.lib;gdiplus.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>msimg32.lib;gdiplus.lib;comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<BaseAddress>0x55550000</BaseAddress>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
diff --git a/plugins/Popup/Popup_11.vcxproj b/plugins/Popup/Popup_11.vcxproj
index 9bd77f9b61..4f34e94fd8 100644
--- a/plugins/Popup/Popup_11.vcxproj
+++ b/plugins/Popup/Popup_11.vcxproj
@@ -89,7 +89,7 @@
<AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>msimg32.lib;gdiplus.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>msimg32.lib;gdiplus.lib;comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<BaseAddress>0x55550000</BaseAddress>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -114,7 +114,7 @@
<AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>msimg32.lib;gdiplus.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>msimg32.lib;gdiplus.lib;comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<BaseAddress>0x55550000</BaseAddress>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -141,7 +141,7 @@
<AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>msimg32.lib;gdiplus.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>msimg32.lib;gdiplus.lib;comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<BaseAddress>0x55550000</BaseAddress>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -170,7 +170,7 @@
<AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>msimg32.lib;gdiplus.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>msimg32.lib;gdiplus.lib;comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<BaseAddress>0x55550000</BaseAddress>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
diff --git a/plugins/Popup/src/actions.cpp b/plugins/Popup/src/actions.cpp
index 9b5fd8fda8..28b9a781f2 100644
--- a/plugins/Popup/src/actions.cpp
+++ b/plugins/Popup/src/actions.cpp
@@ -221,7 +221,7 @@ INT_PTR CALLBACK DlgProcPopupActions(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
HWND hwndList = GetDlgItem(hwnd, IDC_ACTIONS);
ListView_SetExtendedListViewStyleEx(hwndList, 0, LVS_EX_CHECKBOXES|LVS_EX_LABELTIP);
- HIMAGELIST hImgList = ImageList_Create(16, 16, ILC_MASK | (IsWinVerXPPlus()? ILC_COLOR32 : ILC_COLOR16), 10, 1);
+ HIMAGELIST hImgList = ImageList_Create(16, 16, ILC_MASK | ILC_COLOR32, 10, 1);
ListView_SetImageList(hwndList, hImgList, LVSIL_SMALL);
LVCOLUMN column = {0};
@@ -230,8 +230,7 @@ INT_PTR CALLBACK DlgProcPopupActions(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
column.cx = 175;
ListView_InsertColumn(hwndList, 0, &column);
- if (IsWinVerXPPlus())
- ListView_EnableGroupView(hwndList, TRUE);
+ ListView_EnableGroupView(hwndList, TRUE);
LIST<char> groups(1, strcmp);
@@ -244,7 +243,7 @@ INT_PTR CALLBACK DlgProcPopupActions(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
int grpId = 0;
- if (IsWinVerXPPlus() && ((grpId = groups.getIndex(szGroup)) < 0))
+ if ((grpId = groups.getIndex(szGroup)) < 0)
{
LVGROUP group = {0};
group.cbSize = sizeof(group);
@@ -265,10 +264,8 @@ INT_PTR CALLBACK DlgProcPopupActions(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
item.pszText = TranslateTS(tszName);
item.iImage = ImageList_AddIcon(hImgList, gActions[i]->lchIcon);
item.lParam = i;
- if (IsWinVerXPPlus()) {
- item.mask |= LVIF_GROUPID;
- item.iGroupId = grpId;
- }
+ item.mask |= LVIF_GROUPID;
+ item.iGroupId = grpId;
item.iIndent = 0;
ListView_InsertItemW(hwndList, &item);
diff --git a/plugins/Popup/src/headers.h b/plugins/Popup/src/headers.h
index e24116d5b2..9ef40481fd 100644
--- a/plugins/Popup/src/headers.h
+++ b/plugins/Popup/src/headers.h
@@ -60,6 +60,7 @@ http://miranda-ng.org/distr/
#include <commctrl.h>
#include <shellapi.h>
#include <malloc.h>
+#include <Uxtheme.h>
#include <newpluginapi.h>
#include <win2k.h>
diff --git a/plugins/Popup/src/opt_contacts.cpp b/plugins/Popup/src/opt_contacts.cpp
index 3d7f976c1e..da4b535f21 100644
--- a/plugins/Popup/src/opt_contacts.cpp
+++ b/plugins/Popup/src/opt_contacts.cpp
@@ -37,8 +37,7 @@ INT_PTR CALLBACK DlgProcContactOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
SendMessage(GetDlgItem(hwnd, IDC_ICO_FULLSCREEN), STM_SETICON, (WPARAM)IcoLib_GetIcon(ICO_OPT_FULLSCREEN,0), 0);
SendMessage(GetDlgItem(hwnd, IDC_ICO_BLOCK), STM_SETICON, (WPARAM)IcoLib_GetIcon(ICO_OPT_BLOCK,0), 0);
{
- HIMAGELIST hIml = ImageList_Create(GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),
- (IsWinVerXPPlus()?ILC_COLOR32:ILC_COLOR16)|ILC_MASK,5,5);
+ HIMAGELIST hIml = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 5, 5);
ImageList_AddIcon(hIml, LoadSkinnedIcon(SKINICON_OTHER_SMALLDOT));
ImageList_AddIcon(hIml, IcoLib_GetIcon(ICO_OPT_DEF,0));
ImageList_AddIcon(hIml, IcoLib_GetIcon(ICO_OPT_FAV,0));
diff --git a/plugins/Popup/src/opt_gen.cpp b/plugins/Popup/src/opt_gen.cpp
index 5652e8dc0c..f6287bf1bf 100644
--- a/plugins/Popup/src/opt_gen.cpp
+++ b/plugins/Popup/src/opt_gen.cpp
@@ -607,19 +607,6 @@ void Check_ReorderPopups(HWND hwnd) {
if (hwnd) CheckDlgButton(hwnd, IDC_REORDERPOPUPS, PopupOptions.ReorderPopups);
}
-void ThemeDialogBackground(HWND hwnd)
-{
- if (IsWinVerXPPlus()) {
- static HMODULE hThemeAPI = NULL;
- if (!hThemeAPI) hThemeAPI = GetModuleHandleA("uxtheme");
- if (hThemeAPI) {
- HRESULT (STDAPICALLTYPE *MyEnableThemeDialogTexture)(HWND,DWORD) = (HRESULT (STDAPICALLTYPE*)(HWND,DWORD))GetProcAddress(hThemeAPI,"EnableThemeDialogTexture");
- if (MyEnableThemeDialogTexture)
- MyEnableThemeDialogTexture(hwnd,0x00000002|0x00000004); //0x00000002|0x00000004=ETDT_ENABLETAB
- }
- }
-}
-
INT_PTR CALLBACK PositionBoxDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
LOGFONT lf;
@@ -627,7 +614,7 @@ INT_PTR CALLBACK PositionBoxDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
switch (msg) {
case WM_INITDIALOG:
- ThemeDialogBackground(hwndDlg);
+ EnableThemeDialogTexture(hwndDlg, ETDT_ENABLETAB);
GetObject((HFONT)SendMessage(GetDlgItem(hwndDlg, IDC_TITLE), WM_GETFONT, 0, 0), sizeof(lf), &lf);
lf.lfWeight = FW_BOLD;
diff --git a/plugins/Popup/src/opt_skins.cpp b/plugins/Popup/src/opt_skins.cpp
index 5b3c656684..b9ad9c726d 100644
--- a/plugins/Popup/src/opt_skins.cpp
+++ b/plugins/Popup/src/opt_skins.cpp
@@ -34,7 +34,7 @@ void RegisterOptPrevBox()
WNDCLASSEX wcl;
wcl.cbSize = sizeof(wcl);
wcl.lpfnWndProc = (WNDPROC)BoxPreviewWndProc;
- wcl.style = IsWinVerXPPlus() ? CS_DROPSHADOW : 0;
+ wcl.style = CS_DROPSHADOW;
wcl.cbClsExtra = 0;
wcl.cbWndExtra = 0;
wcl.hInstance = hInst;
@@ -57,7 +57,7 @@ void RegisterOptPrevBox()
GetClassInfoEx(hInst, _T("#32770"), &wcl);
wcl.hInstance = hInst;
wcl.lpszClassName = _T("PopupPlusDlgBox");
- wcl.style |= IsWinVerXPPlus() ? CS_DROPSHADOW : 0;
+ wcl.style |= CS_DROPSHADOW;
g_wndClass.cPopupPlusDlgBox = RegisterClassEx(&wcl);
err = GetLastError();
if (!g_wndClass.cPopupPlusDlgBox) {
@@ -219,12 +219,10 @@ int SkinOptionList_AddMain(OPTTREE_OPTION* &options, int *OptionsCount, int pos,
bCheck = PopupOptions.DisplayTime;
break;
case 1:
- if (!IsWinVerXPPlus()) continue;
*dwGlobalOptions |= PopupOptions.DropShadow ? (1 << i) : 0;
bCheck = PopupOptions.DropShadow;
break;
case 2:
- if (!IsWinVerXPPlus()) continue;
*dwGlobalOptions |= PopupOptions.EnableFreeformShadows ? (1 << i) : 0;
bCheck = PopupOptions.EnableFreeformShadows;
break;
diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp
index 1616aa3f4a..f6d493138d 100644
--- a/plugins/Popup/src/popup_wnd2.cpp
+++ b/plugins/Popup/src/popup_wnd2.cpp
@@ -76,40 +76,36 @@ bool LoadPopupWnd2()
}
// register custom class for edit box with drop-shadow attribute
- if (IsWinVerXPPlus())
- {
-
- #define MyRegisterClassExW RegisterClassExW
- #define MyGetClassInfoExW GetClassInfoExW
-
- WNDCLASSEXW wclw = {0};
- wclw.cbSize = sizeof(wclw);
- if (!MyGetClassInfoExW(NULL, L"EDIT", &wclw))
- MSGERROR(TranslateT("Failed to GetClassInfoExW from EDIT class."));
- wclw.hInstance = hInst;
- wclw.lpszClassName = L"PopupEditBox";
- wclw.style |= CS_DROPSHADOW;
- g_wndClass.cPopupEditBox = MyRegisterClassExW(&wclw);
- err = GetLastError();
- if (!g_wndClass.cPopupEditBox) {
- TCHAR msg[2048];
- mir_sntprintf(msg, SIZEOF(msg), TranslateT("Failed to register custom edit box window class.\r\n\r\ncbSize: %i\r\nstyle: %p\r\nlpfnWndProc: %i\r\ncbClsExtra: %i\r\ncbWndExtra: %i\r\nhInstance: %i\r\nhIcon: %i\r\nhCursor: %i\r\nhbrBackground: %i\r\nlpszMenuName: %s\r\nlpszClassName: %s\r\nhIconSm: %i\r\n"),
- wclw.cbSize, //UINT cbSize;
- wclw.style, //UINT style;
- wclw.lpfnWndProc, //WNDPROC lpfnWndProc;
- wclw.cbClsExtra, //int cbClsExtra;
- wclw.cbWndExtra, //int cbWndExtra;
- wclw.hInstance, //HINSTANCE hInstance;
- wclw.hIcon, //HICON hIcon;
- wclw.hCursor, //HCURSOR hCursor;
- wclw.hbrBackground, //HBRUSH hbrBackground;
- wclw.lpszMenuName, //LPCWSTR lpszMenuName;
- wclw.lpszClassName, //LPCWSTR lpszClassName;
- wclw.hIconSm //HICON hIconSm;
- );
-
- MSGERROR(msg);
- }
+ #define MyRegisterClassExW RegisterClassExW
+ #define MyGetClassInfoExW GetClassInfoExW
+
+ WNDCLASSEXW wclw = {0};
+ wclw.cbSize = sizeof(wclw);
+ if (!MyGetClassInfoExW(NULL, L"EDIT", &wclw))
+ MSGERROR(TranslateT("Failed to GetClassInfoExW from EDIT class."));
+ wclw.hInstance = hInst;
+ wclw.lpszClassName = L"PopupEditBox";
+ wclw.style |= CS_DROPSHADOW;
+ g_wndClass.cPopupEditBox = MyRegisterClassExW(&wclw);
+ err = GetLastError();
+ if (!g_wndClass.cPopupEditBox) {
+ TCHAR msg[2048];
+ mir_sntprintf(msg, SIZEOF(msg), TranslateT("Failed to register custom edit box window class.\r\n\r\ncbSize: %i\r\nstyle: %p\r\nlpfnWndProc: %i\r\ncbClsExtra: %i\r\ncbWndExtra: %i\r\nhInstance: %i\r\nhIcon: %i\r\nhCursor: %i\r\nhbrBackground: %i\r\nlpszMenuName: %s\r\nlpszClassName: %s\r\nhIconSm: %i\r\n"),
+ wclw.cbSize, //UINT cbSize;
+ wclw.style, //UINT style;
+ wclw.lpfnWndProc, //WNDPROC lpfnWndProc;
+ wclw.cbClsExtra, //int cbClsExtra;
+ wclw.cbWndExtra, //int cbWndExtra;
+ wclw.hInstance, //HINSTANCE hInstance;
+ wclw.hIcon, //HICON hIcon;
+ wclw.hCursor, //HCURSOR hCursor;
+ wclw.hbrBackground, //HBRUSH hbrBackground;
+ wclw.lpszMenuName, //LPCWSTR lpszMenuName;
+ wclw.lpszClassName, //LPCWSTR lpszClassName;
+ wclw.hIconSm //HICON hIconSm;
+ );
+
+ MSGERROR(msg);
}
ZeroMemory(&wcl, sizeof(wcl));
@@ -207,15 +203,13 @@ void PopupWnd2::create()
(LPVOID)this);
// Shadows
- if (IsWinVerXPPlus()) {
- ULONG_PTR style = GetClassLongPtr(m_hwnd, GCL_STYLE);
- if (m_options->DropShadow && !(style & CS_DROPSHADOW))
- style |= CS_DROPSHADOW;
- else if (!m_options->DropShadow && (style & CS_DROPSHADOW))
- style &= ~CS_DROPSHADOW;
-
- SetClassLongPtr(m_hwnd, GCL_STYLE, style);
- }
+ ULONG_PTR style = GetClassLongPtr(m_hwnd, GCL_STYLE);
+ if (m_options->DropShadow && !(style & CS_DROPSHADOW))
+ style |= CS_DROPSHADOW;
+ else if (!m_options->DropShadow && (style & CS_DROPSHADOW))
+ style &= ~CS_DROPSHADOW;
+
+ SetClassLongPtr(m_hwnd, GCL_STYLE, style);
// tooltips
m_hwndToolTip = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, NULL,