diff options
Diffstat (limited to 'plugins')
23 files changed, 68 insertions, 283 deletions
diff --git a/plugins/SendScreenshotPlus/SendSS_10.vcxproj b/plugins/SendScreenshotPlus/SendSS_10.vcxproj index f5b6eaf5d2..8e8310ac0b 100644 --- a/plugins/SendScreenshotPlus/SendSS_10.vcxproj +++ b/plugins/SendScreenshotPlus/SendSS_10.vcxproj @@ -82,7 +82,7 @@ <PrecompiledHeader>Use</PrecompiledHeader>
</ClCompile>
<Link>
- <AdditionalDependencies>gdiplus.lib;msimg32.lib;shlwapi.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>gdiplus.lib;msimg32.lib;shlwapi.lib;comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
@@ -109,7 +109,7 @@ <PrecompiledHeader>Use</PrecompiledHeader>
</ClCompile>
<Link>
- <AdditionalDependencies>gdiplus.lib;msimg32.lib;shlwapi.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>gdiplus.lib;msimg32.lib;shlwapi.lib;comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
@@ -132,7 +132,7 @@ <PrecompiledHeader>Use</PrecompiledHeader>
</ClCompile>
<Link>
- <AdditionalDependencies>gdiplus.lib;msimg32.lib;shlwapi.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>gdiplus.lib;msimg32.lib;shlwapi.lib;comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
@@ -158,7 +158,7 @@ <PrecompiledHeader>Use</PrecompiledHeader>
</ClCompile>
<Link>
- <AdditionalDependencies>gdiplus.lib;msimg32.lib;shlwapi.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>gdiplus.lib;msimg32.lib;shlwapi.lib;comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
diff --git a/plugins/SendScreenshotPlus/SendSS_11.vcxproj b/plugins/SendScreenshotPlus/SendSS_11.vcxproj index 3c124a614e..e353293c39 100644 --- a/plugins/SendScreenshotPlus/SendSS_11.vcxproj +++ b/plugins/SendScreenshotPlus/SendSS_11.vcxproj @@ -86,7 +86,7 @@ <PrecompiledHeader>Use</PrecompiledHeader>
</ClCompile>
<Link>
- <AdditionalDependencies>gdiplus.lib;msimg32.lib;shlwapi.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>gdiplus.lib;msimg32.lib;shlwapi.lib;comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
@@ -112,7 +112,7 @@ <PrecompiledHeader>Use</PrecompiledHeader>
</ClCompile>
<Link>
- <AdditionalDependencies>gdiplus.lib;msimg32.lib;shlwapi.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>gdiplus.lib;msimg32.lib;shlwapi.lib;comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
@@ -136,7 +136,7 @@ <PrecompiledHeader>Use</PrecompiledHeader>
</ClCompile>
<Link>
- <AdditionalDependencies>gdiplus.lib;msimg32.lib;shlwapi.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>gdiplus.lib;msimg32.lib;shlwapi.lib;comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
@@ -161,7 +161,7 @@ <PrecompiledHeader>Use</PrecompiledHeader>
</ClCompile>
<Link>
- <AdditionalDependencies>gdiplus.lib;msimg32.lib;shlwapi.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>gdiplus.lib;msimg32.lib;shlwapi.lib;comctl32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
diff --git a/plugins/SendScreenshotPlus/src/ctrl_button.cpp b/plugins/SendScreenshotPlus/src/ctrl_button.cpp index 7a3b2b5380..152e3b17db 100644 --- a/plugins/SendScreenshotPlus/src/ctrl_button.cpp +++ b/plugins/SendScreenshotPlus/src/ctrl_button.cpp @@ -23,8 +23,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define BUTTON_POLLID 100
#define BUTTON_POLLDELAY 50
-#define MGPROC(x) GetProcAddress(themeAPIHandle,x)
-
typedef struct TMBCtrl{
HWND hwnd;
HANDLE hThemeButton;
@@ -47,53 +45,6 @@ typedef struct TMBCtrl{ // External theme methods and properties
CRITICAL_SECTION csTips;
HWND hwndToolTips = NULL;
-HMODULE themeAPIHandle = NULL;
-
-// theme procedures
-HANDLE (WINAPI *OpenThemeData)(HWND,LPCWSTR);
-HRESULT (WINAPI *CloseThemeData)(HANDLE);
-BOOL (WINAPI *IsThemeBackgroundPartiallyTransparent)(HANDLE,INT,INT);
-HRESULT (WINAPI *DrawThemeParentBackground)(HWND,HDC,RECT *);
-HRESULT (WINAPI *DrawThemeBackground)(HANDLE,HDC,INT,INT,const RECT *,const RECT *);
-HRESULT (WINAPI *DrawThemeText)(HANDLE,HDC,INT,INT,LPCWSTR,INT,DWORD,DWORD,const RECT *);
-HRESULT (WINAPI *GetThemeTextExtent)(HANDLE,HDC,INT,INT,LPCWSTR,INT,DWORD,OPTIONAL const RECT*, RECT *);
-HRESULT (WINAPI *GetThemeBackgroundRegion)(HANDLE,HDC,INT,INT,const RECT *,HRGN *);
-
-/**
- * name: ThemeSupport
- * desc: Loads the uxtheme functions, if supported by the os
- * param: none
- * return: TRUE if themes are supported, FALSE if not
- **/
-BOOLEAN __fastcall ThemeSupport() {
- if (IsWinVerXPPlus()) {
- if (!themeAPIHandle) {
- themeAPIHandle = GetModuleHandleA("uxtheme");
- if (themeAPIHandle) {
- OpenThemeData = (HANDLE (WINAPI *)(HWND,LPCWSTR))MGPROC("OpenThemeData");
- CloseThemeData = (HRESULT (WINAPI *)(HANDLE))MGPROC("CloseThemeData");
- IsThemeBackgroundPartiallyTransparent = (BOOL (WINAPI *)(HANDLE,INT,INT))MGPROC("IsThemeBackgroundPartiallyTransparent");
- DrawThemeParentBackground = (HRESULT (WINAPI *)(HWND,HDC,RECT *))MGPROC("DrawThemeParentBackground");
- DrawThemeBackground = (HRESULT (WINAPI *)(HANDLE,HDC,INT,INT,const RECT *,const RECT *))MGPROC("DrawThemeBackground");
- DrawThemeText = (HRESULT (WINAPI *)(HANDLE,HDC,INT,INT,LPCWSTR,INT,DWORD,DWORD,const RECT *))MGPROC("DrawThemeText");
- GetThemeTextExtent = (HRESULT (WINAPI *)(HANDLE,HDC,INT,INT,LPCWSTR,INT,DWORD,OPTIONAL const RECT*, RECT *))MGPROC("GetThemeTextExtent");
- GetThemeBackgroundRegion = (HRESULT (WINAPI *)(HANDLE,HDC,INT,INT,const RECT *,HRGN *))MGPROC("GetThemeBackgroundRegion");
- }
- }
- // Make sure all of these methods are valid (i would hope either all or none work)
- if (OpenThemeData
- && CloseThemeData
- && IsThemeBackgroundPartiallyTransparent
- && DrawThemeParentBackground
- && DrawThemeBackground
- && DrawThemeText
- && GetThemeTextExtent)
- {
- return TRUE;
- }
- }
- return FALSE;
-}
/**
* name: DestroyTheme
@@ -101,7 +52,8 @@ BOOLEAN __fastcall ThemeSupport() { * param: ctl - BTNCTRL structure with the information about the theme to close
* return: nothing
**/
-static VOID __fastcall DestroyTheme(BTNCTRL *ctl) {
+static VOID __fastcall DestroyTheme(BTNCTRL *ctl)
+{
if (ctl->hThemeButton) {
CloseThemeData(ctl->hThemeButton);
ctl->hThemeButton = NULL;
@@ -118,12 +70,11 @@ static VOID __fastcall DestroyTheme(BTNCTRL *ctl) { * param: ctl - BTNCTRL structure with the information about the theme to load
* return: nothing
**/
-static VOID __fastcall LoadTheme(BTNCTRL *ctl) {
- if (ThemeSupport()) {
- DestroyTheme(ctl);
- ctl->hThemeButton = OpenThemeData(ctl->hwnd,L"BUTTON");
- ctl->hThemeToolbar = OpenThemeData(ctl->hwnd,L"TOOLBAR");
- }
+static VOID __fastcall LoadTheme(BTNCTRL *ctl)
+{
+ DestroyTheme(ctl);
+ ctl->hThemeButton = OpenThemeData(ctl->hwnd,L"BUTTON");
+ ctl->hThemeToolbar = OpenThemeData(ctl->hwnd,L"TOOLBAR");
}
/**
diff --git a/plugins/SendScreenshotPlus/src/ctrl_button.h b/plugins/SendScreenshotPlus/src/ctrl_button.h index dc77334b05..0e4106460d 100644 --- a/plugins/SendScreenshotPlus/src/ctrl_button.h +++ b/plugins/SendScreenshotPlus/src/ctrl_button.h @@ -24,20 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef _UINFOEX_BOTTONS_H_INCLUDED_
#define _UINFOEX_BOTTONS_H_INCLUDED_ 1
-// theme procedures
-extern HANDLE (WINAPI *OpenThemeData)(HWND,LPCWSTR);
-extern HRESULT (WINAPI *CloseThemeData)(HANDLE);
-extern BOOL (WINAPI *IsThemeBackgroundPartiallyTransparent)(HANDLE,INT,INT);
-extern HRESULT (WINAPI *DrawThemeParentBackground)(HWND,HDC,RECT *);
-extern HRESULT (WINAPI *DrawThemeBackground)(HANDLE,HDC,INT,INT,const RECT *,const RECT *);
-extern HRESULT (WINAPI *DrawThemeText)(HANDLE,HDC,INT,INT,LPCWSTR,INT,DWORD,DWORD,const RECT *);
-extern HRESULT (WINAPI *GetThemeTextExtent)(HANDLE,HDC,INT,INT,LPCWSTR,INT,DWORD,OPTIONAL const RECT*, RECT *);
-extern HRESULT (WINAPI *GetThemeBackgroundRegion)(HANDLE,HDC,INT,INT,const RECT *,HRGN *);
-
-
VOID CtrlButtonLoadModule();
VOID CtrlButtonUnloadModule();
-BOOLEAN __fastcall ThemeSupport();
-
#endif /* _UINFOEX_BOTTONS_H_INCLUDED_ */
\ No newline at end of file diff --git a/plugins/SendScreenshotPlus/src/global.h b/plugins/SendScreenshotPlus/src/global.h index cb1a374d0e..60a9cc05c6 100644 --- a/plugins/SendScreenshotPlus/src/global.h +++ b/plugins/SendScreenshotPlus/src/global.h @@ -40,6 +40,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <Shlwapi.h>
#include <gdiplus.h>
#include <mapi.h>
+#include <UxTheme.h>
+
#include <map>
#include <string>
using namespace std;
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_10.vcxproj b/plugins/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_10.vcxproj index 7d2848e789..1b5fc0bf76 100644 --- a/plugins/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_10.vcxproj +++ b/plugins/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_10.vcxproj @@ -94,6 +94,7 @@ <BaseAddress>0x11bd0000</BaseAddress>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin10\lib</AdditionalLibraryDirectories>
+ <AdditionalDependencies>UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -127,6 +128,7 @@ <RandomizedBaseAddress>false</RandomizedBaseAddress>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin10\lib</AdditionalLibraryDirectories>
<AdditionalOptions>/PDBALTPATH:%_PDB%</AdditionalOptions>
+ <AdditionalDependencies>UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -175,6 +177,7 @@ <BaseAddress>0x11bd0000</BaseAddress>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin10\lib</AdditionalLibraryDirectories>
<AdditionalOptions>/PDBALTPATH:%_PDB%</AdditionalOptions>
+ <AdditionalDependencies>UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
@@ -201,6 +204,7 @@ <RandomizedBaseAddress>false</RandomizedBaseAddress>
<BaseAddress>0x11bd0000</BaseAddress>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin10\lib</AdditionalLibraryDirectories>
+ <AdditionalDependencies>UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_11.vcxproj b/plugins/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_11.vcxproj index 47930111c0..70ab5a61cd 100644 --- a/plugins/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_11.vcxproj +++ b/plugins/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_11.vcxproj @@ -99,6 +99,7 @@ <RandomizedBaseAddress>false</RandomizedBaseAddress>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin11\lib</AdditionalLibraryDirectories>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ <AdditionalDependencies>UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -131,6 +132,7 @@ <SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin11\lib</AdditionalLibraryDirectories>
+ <AdditionalDependencies>UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -178,6 +180,7 @@ <RandomizedBaseAddress>false</RandomizedBaseAddress>
<BaseAddress>0x11bd0000</BaseAddress>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin11\lib</AdditionalLibraryDirectories>
+ <AdditionalDependencies>UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
@@ -204,6 +207,7 @@ <RandomizedBaseAddress>false</RandomizedBaseAddress>
<BaseAddress>0x11bd0000</BaseAddress>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin11\lib</AdditionalLibraryDirectories>
+ <AdditionalDependencies>UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/options.cpp b/plugins/StatusPlugins/AdvancedAutoAway/options.cpp index 6dfb8aa72c..9c89937a0f 100644 --- a/plugins/StatusPlugins/AdvancedAutoAway/options.cpp +++ b/plugins/StatusPlugins/AdvancedAutoAway/options.cpp @@ -21,16 +21,6 @@ #include "../resource.h"
#include <commctrl.h>
-static BOOL (WINAPI *pfnEnableThemeDialogTexture)(HANDLE, DWORD) = 0;
-
-// Thanks to TioDuke for cleaning up the ListView handling
-#ifndef ListView_GetCheckState
-#define ListView_GetCheckState(w,i) ((((UINT)(SNDMSG((w),LVM_GETITEMSTATE,(WPARAM)(i),LVIS_STATEIMAGEMASK)))>>12)-1)
-#endif
-#ifndef ListView_SetCheckState
-#define ListView_SetCheckState(w,i,f) ListView_SetItemState(w,i,INDEXTOSTATEIMAGEMASK((f)+1),LVIS_STATEIMAGEMASK)
-#endif
-
int LoadAutoAwaySetting(TAAAProtoSetting& autoAwaySetting, char* protoName);
INT_PTR CALLBACK DlgProcAutoAwayMsgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
@@ -452,8 +442,7 @@ static INT_PTR CALLBACK DlgProcAutoAwayTabs(HWND hwndDlg, UINT msg, WPARAM wPara tci.mask = TCIF_TEXT|TCIF_PARAM;
tci.pszText = TranslateT("General");
hPage = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_OPT_GENAUTOAWAY), hwndDlg, DlgProcAutoAwayGeneralOpts, (LPARAM)GetParent(hwndDlg));
- if (pfnEnableThemeDialogTexture)
- pfnEnableThemeDialogTexture(hPage, ETDT_ENABLETAB);
+ EnableThemeDialogTexture(hPage, ETDT_ENABLETAB);
tci.lParam = (LPARAM)hPage;
GetClientRect(hPage, &rcPage);
@@ -465,8 +454,7 @@ static INT_PTR CALLBACK DlgProcAutoAwayTabs(HWND hwndDlg, UINT msg, WPARAM wPara tci.mask = TCIF_TEXT|TCIF_PARAM;
tci.pszText = TranslateT("Rules");
hPage = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_OPT_AUTOAWAY), hwndDlg, DlgProcAutoAwayRulesOpts, (LPARAM)GetParent(hwndDlg));
- if (pfnEnableThemeDialogTexture)
- pfnEnableThemeDialogTexture(hPage, ETDT_ENABLETAB);
+ EnableThemeDialogTexture(hPage, ETDT_ENABLETAB);
tci.lParam = (LPARAM)hPage;
GetClientRect(hPage, &rcPage);
@@ -477,8 +465,7 @@ static INT_PTR CALLBACK DlgProcAutoAwayTabs(HWND hwndDlg, UINT msg, WPARAM wPara tci.mask = TCIF_TEXT|TCIF_PARAM;
tci.pszText = TranslateT("Status Messages");
hPage = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_OPT_AUTOAWAYMSG), hwndDlg, DlgProcAutoAwayMsgOpts, (LPARAM)GetParent(hwndDlg));
- if (pfnEnableThemeDialogTexture)
- pfnEnableThemeDialogTexture(hPage, ETDT_ENABLETAB);
+ EnableThemeDialogTexture(hPage, ETDT_ENABLETAB);
tci.lParam = (LPARAM)hPage;
GetClientRect(hPage, &rcPage);
@@ -533,13 +520,6 @@ static INT_PTR CALLBACK DlgProcAutoAwayTabs(HWND hwndDlg, UINT msg, WPARAM wPara int AutoAwayOptInitialise(WPARAM wParam,LPARAM lParam)
{
- HMODULE hUxTheme = NULL;
- if(IsWinVerXPPlus()) {
- hUxTheme = GetModuleHandle(_T("uxtheme.dll"));
- if (hUxTheme)
- pfnEnableThemeDialogTexture = (BOOL (WINAPI *)(HANDLE, DWORD))GetProcAddress(hUxTheme, "EnableThemeDialogTexture");
- }
-
OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
odp.position = 1000000000;
diff --git a/plugins/StatusPlugins/KeepStatus/KeepStatus_10.vcxproj b/plugins/StatusPlugins/KeepStatus/KeepStatus_10.vcxproj index 39d256af02..0ae73ed1d0 100644 --- a/plugins/StatusPlugins/KeepStatus/KeepStatus_10.vcxproj +++ b/plugins/StatusPlugins/KeepStatus/KeepStatus_10.vcxproj @@ -88,7 +88,7 @@ <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>ws2_32.lib;wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>ws2_32.lib;wininet.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
@@ -120,7 +120,7 @@ <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>ws2_32.lib;wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>ws2_32.lib;wininet.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
@@ -155,7 +155,7 @@ </Link>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
- <AdditionalDependencies>ws2_32.lib;wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>ws2_32.lib;wininet.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<SubSystem>Windows</SubSystem>
@@ -183,7 +183,7 @@ <ExceptionHandling>false</ExceptionHandling>
</ClCompile>
<Link>
- <AdditionalDependencies>ws2_32.lib;wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>ws2_32.lib;wininet.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<SubSystem>Windows</SubSystem>
diff --git a/plugins/StatusPlugins/KeepStatus/KeepStatus_11.vcxproj b/plugins/StatusPlugins/KeepStatus/KeepStatus_11.vcxproj index 1a1519b540..bd4aa6fec1 100644 --- a/plugins/StatusPlugins/KeepStatus/KeepStatus_11.vcxproj +++ b/plugins/StatusPlugins/KeepStatus/KeepStatus_11.vcxproj @@ -92,7 +92,7 @@ <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>ws2_32.lib;wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>ws2_32.lib;wininet.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
@@ -125,7 +125,7 @@ <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>ws2_32.lib;wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>ws2_32.lib;wininet.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
@@ -159,7 +159,7 @@ </Link>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
- <AdditionalDependencies>ws2_32.lib;wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>ws2_32.lib;wininet.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<SubSystem>Windows</SubSystem>
@@ -186,7 +186,7 @@ <ExceptionHandling>false</ExceptionHandling>
</ClCompile>
<Link>
- <AdditionalDependencies>ws2_32.lib;wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>ws2_32.lib;wininet.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<SubSystem>Windows</SubSystem>
diff --git a/plugins/StatusPlugins/KeepStatus/options.cpp b/plugins/StatusPlugins/KeepStatus/options.cpp index 949534c71b..5af3bc584f 100644 --- a/plugins/StatusPlugins/KeepStatus/options.cpp +++ b/plugins/StatusPlugins/KeepStatus/options.cpp @@ -20,16 +20,6 @@ #include "keepstatus.h"
#include "../resource.h"
-static BOOL (WINAPI *pfnEnableThemeDialogTexture)(HANDLE, DWORD) = 0;
-
-// Thanks to TioDuke for cleaning up the ListView handling
-#ifndef ListView_GetCheckState
-#define ListView_GetCheckState(w,i) ((((UINT)(SNDMSG((w),LVM_GETITEMSTATE,(WPARAM)(i),LVIS_STATEIMAGEMASK)))>>12)-1)
-#endif
-#ifndef ListView_SetCheckState
-#define ListView_SetCheckState(w,i,f) ListView_SetItemState(w,i,INDEXTOSTATEIMAGEMASK((f)+1),LVIS_STATEIMAGEMASK)
-#endif
-
// prototypes
INT_PTR CALLBACK OptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam);
INT_PTR CALLBACK PopupOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam);
@@ -292,8 +282,7 @@ static INT_PTR CALLBACK DlgProcKsTabs(HWND hwndDlg, UINT msg, WPARAM wParam, LPA tci.mask = TCIF_TEXT|TCIF_PARAM;
tci.pszText = TranslateT("Basic");
hShow = hBasicTab = hPage = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_OPT_KS_BASIC), hwndDlg, DlgProcKSBasicOpts, (LPARAM)GetParent(hwndDlg));
- if (pfnEnableThemeDialogTexture)
- pfnEnableThemeDialogTexture(hPage, ETDT_ENABLETAB);
+ EnableThemeDialogTexture(hPage, ETDT_ENABLETAB);
tci.lParam = (LPARAM)hPage;
GetClientRect(hPage, &rcPage);
@@ -305,9 +294,8 @@ static INT_PTR CALLBACK DlgProcKsTabs(HWND hwndDlg, UINT msg, WPARAM wParam, LPA tci.mask = TCIF_TEXT|TCIF_PARAM;
tci.pszText = TranslateT("Advanced");
hPage = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_OPT_KS_ADV), hwndDlg, DlgProcKSAdvOpts, (LPARAM)GetParent(hwndDlg));
- if (pfnEnableThemeDialogTexture) {
- pfnEnableThemeDialogTexture(hPage, ETDT_ENABLETAB);
- }
+ EnableThemeDialogTexture(hPage, ETDT_ENABLETAB);
+
tci.lParam = (LPARAM)hPage;
GetClientRect(hPage, &rcPage);
MoveWindow(hPage, (rcTabs.left - rcOptions.left) + ((rcTabs.right-rcTabs.left)-(rcPage.right-rcPage.left))/2, 10 + (rcTabs.top - rcOptions.top) + ((rcTabs.bottom-rcTabs.top)-(rcPage.bottom-rcPage.top))/2, rcPage.right-rcPage.left, rcPage.bottom-rcPage.top, TRUE);
@@ -577,12 +565,6 @@ INT_PTR CALLBACK PopupOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPar int OptionsInit(WPARAM wparam,LPARAM lparam)
{
- if ( IsWinVerXPPlus()) {
- HMODULE hUxTheme = GetModuleHandle(_T("uxtheme.dll"));
- if (hUxTheme)
- pfnEnableThemeDialogTexture = (BOOL (WINAPI *)(HANDLE, DWORD))GetProcAddress(hUxTheme, "EnableThemeDialogTexture");
- }
-
OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
odp.hInstance = hInst;
diff --git a/plugins/UserInfoEx/UInfoEx_10.vcxproj b/plugins/UserInfoEx/UInfoEx_10.vcxproj index 3a0b4c2dd3..d790bb65e3 100644 --- a/plugins/UserInfoEx/UInfoEx_10.vcxproj +++ b/plugins/UserInfoEx/UInfoEx_10.vcxproj @@ -87,7 +87,7 @@ <AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>comctl32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;shlwapi.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -112,7 +112,7 @@ <AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>comctl32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;shlwapi.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -138,7 +138,7 @@ <AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>comctl32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;shlwapi.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
@@ -167,7 +167,7 @@ <AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>comctl32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;shlwapi.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
diff --git a/plugins/UserInfoEx/UInfoEx_11.vcxproj b/plugins/UserInfoEx/UInfoEx_11.vcxproj index 0ed11eee9c..3baf3b8d5c 100644 --- a/plugins/UserInfoEx/UInfoEx_11.vcxproj +++ b/plugins/UserInfoEx/UInfoEx_11.vcxproj @@ -91,7 +91,7 @@ <AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>comctl32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;shlwapi.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -117,7 +117,7 @@ <AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>comctl32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;shlwapi.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -143,7 +143,7 @@ <AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>comctl32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;shlwapi.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
@@ -171,7 +171,7 @@ <AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>comctl32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>comctl32.lib;shlwapi.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
diff --git a/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp b/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp index c18583930d..0e82631427 100644 --- a/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp +++ b/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp @@ -302,14 +302,7 @@ void InitIcons() if (NULL == (dib = LoadResource(IDB_FLAGSPNG,_T("PNG"))))
return;
- if (IsWinVerXPPlus()) bitDest = bit = ILC_COLOR32;
- else if (IsWinVer2000Plus()) bitDest = ILC_COLOR24;
- else if (IsWinVerMEPlus()) bitDest = ILC_COLOR16;
- /*else preset bitDest = ILC_COLOR8;*/
-
- //we work always with 24bit if bitDest < xp+
- //coz we cannot perform paste operations between palettized images,
- //unless both src and dst images use the same palette.
+ bitDest = bit = ILC_COLOR32;
if (FIP->FI_GetBPP(dib) != bit)
if (NULL == (dib = ConvertTo(dib, bit, 0))) return;
diff --git a/plugins/UserInfoEx/src/commonheaders.h b/plugins/UserInfoEx/src/commonheaders.h index 85cc866c83..d5e67ba2f5 100644 --- a/plugins/UserInfoEx/src/commonheaders.h +++ b/plugins/UserInfoEx/src/commonheaders.h @@ -44,6 +44,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <Richedit.h>
#include <dlgs.h>
#include <assert.h>
+#include <UxTheme.h>
#include <string>
using namespace std;
diff --git a/plugins/UserInfoEx/src/ctrl_button.cpp b/plugins/UserInfoEx/src/ctrl_button.cpp index fd29e29f4c..b0ada2b385 100644 --- a/plugins/UserInfoEx/src/ctrl_button.cpp +++ b/plugins/UserInfoEx/src/ctrl_button.cpp @@ -25,8 +25,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define BUTTON_POLLID 100
#define BUTTON_POLLDELAY 50
-#define MGPROC(x) GetProcAddress(themeAPIHandle,x)
-
typedef struct TMBCtrl{
HWND hwnd;
HANDLE hThemeButton;
@@ -49,51 +47,6 @@ typedef struct TMBCtrl{ // External theme methods and properties
static CRITICAL_SECTION csTips;
static HWND hwndToolTips = NULL;
-static HMODULE themeAPIHandle = NULL;
-
-// theme procedures
-static HANDLE (WINAPI *OpenThemeData)(HWND,LPCWSTR);
-static HRESULT (WINAPI *CloseThemeData)(HANDLE);
-static BOOL (WINAPI *IsThemeBackgroundPartiallyTransparent)(HANDLE,int,int);
-static HRESULT (WINAPI *DrawThemeParentBackground)(HWND,HDC,RECT *);
-static HRESULT (WINAPI *DrawThemeBackground)(HANDLE,HDC,int,int,const RECT *,const RECT *);
-static HRESULT (WINAPI *DrawThemeText)(HANDLE,HDC,int,int,LPCWSTR,int,DWORD,DWORD,const RECT *);
-static HRESULT (WINAPI *GetThemeTextExtent)(HANDLE,HDC,int,int,LPCWSTR,int,DWORD,OPTIONAL const RECT*, RECT *);
-
-/**
- * name: ThemeSupport
- * desc: Loads the uxtheme functions, if supported by the os
- * param: none
- * return: TRUE if themes are supported, FALSE if not
- **/
-static BYTE __fastcall ThemeSupport() {
- if (IsWinVerXPPlus()) {
- if (!themeAPIHandle) {
- themeAPIHandle = GetModuleHandleA("uxtheme");
- if (themeAPIHandle) {
- OpenThemeData = (HANDLE (WINAPI *)(HWND,LPCWSTR))MGPROC("OpenThemeData");
- CloseThemeData = (HRESULT (WINAPI *)(HANDLE))MGPROC("CloseThemeData");
- IsThemeBackgroundPartiallyTransparent = (BOOL (WINAPI *)(HANDLE,int,int))MGPROC("IsThemeBackgroundPartiallyTransparent");
- DrawThemeParentBackground = (HRESULT (WINAPI *)(HWND,HDC,RECT *))MGPROC("DrawThemeParentBackground");
- DrawThemeBackground = (HRESULT (WINAPI *)(HANDLE,HDC,int,int,const RECT *,const RECT *))MGPROC("DrawThemeBackground");
- DrawThemeText = (HRESULT (WINAPI *)(HANDLE,HDC,int,int,LPCWSTR,int,DWORD,DWORD,const RECT *))MGPROC("DrawThemeText");
- GetThemeTextExtent = (HRESULT (WINAPI *)(HANDLE,HDC,int,int,LPCWSTR,int,DWORD,OPTIONAL const RECT*, RECT *))MGPROC("GetThemeTextExtent");
- }
- }
- // Make sure all of these methods are valid (i would hope either all or none work)
- if (OpenThemeData
- && CloseThemeData
- && IsThemeBackgroundPartiallyTransparent
- && DrawThemeParentBackground
- && DrawThemeBackground
- && DrawThemeText
- && GetThemeTextExtent)
- {
- return TRUE;
- }
- }
- return FALSE;
-}
/**
* name: DestroyTheme
@@ -119,11 +72,9 @@ static void __fastcall DestroyTheme(BTNCTRL *ctl) { * return: nothing
**/
static void __fastcall LoadTheme(BTNCTRL *ctl) {
- if (ThemeSupport()) {
- DestroyTheme(ctl);
- ctl->hThemeButton = OpenThemeData(ctl->hwnd,L"BUTTON");
- ctl->hThemeToolbar = OpenThemeData(ctl->hwnd,L"TOOLBAR");
- }
+ DestroyTheme(ctl);
+ ctl->hThemeButton = OpenThemeData(ctl->hwnd,L"BUTTON");
+ ctl->hThemeToolbar = OpenThemeData(ctl->hwnd,L"TOOLBAR");
}
/**
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp index 2775719a87..3582c99a10 100644 --- a/plugins/UserInfoEx/src/dlg_propsheet.cpp +++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp @@ -284,7 +284,7 @@ static INT_PTR ShowDialog(WPARAM wParam, LPARAM lParam) // create imagelist
metrics.x = GetSystemMetrics(SM_CXSMICON);
metrics.y = GetSystemMetrics(SM_CYSMICON);
- if ((psh._hImages = ImageList_Create(metrics.x, metrics.y, (IsWinVerXPPlus() ? ILC_COLOR32 : ILC_COLOR16) | ILC_MASK, 0, 1)) == NULL) {
+ if ((psh._hImages = ImageList_Create(metrics.x, metrics.y, ILC_COLOR32 | ILC_MASK, 0, 1)) == NULL) {
MsgErr(NULL, LPGENT("Creating the imagelist failed!"));
return 1;
}
@@ -585,7 +585,7 @@ void DlgContactInfoInitTreeIcons() metrics.x = GetSystemMetrics(SM_CXSMICON);
metrics.y = GetSystemMetrics(SM_CYSMICON);
- if (psh._hImages = ImageList_Create(metrics.x, metrics.y, (IsWinVerXPPlus() ? ILC_COLOR32 : ILC_COLOR16) | ILC_MASK, 0, 1)) {
+ if (psh._hImages = ImageList_Create(metrics.x, metrics.y, ILC_COLOR32 | ILC_MASK, 0, 1)) {
HICON hDefIcon = IcoLib_GetIcon(ICO_TREE_DEFAULT);
if (!hDefIcon)
{
diff --git a/plugins/Variables/Variables_10.vcxproj b/plugins/Variables/Variables_10.vcxproj index 9a68ad3b0b..91cc5ca4dc 100644 --- a/plugins/Variables/Variables_10.vcxproj +++ b/plugins/Variables/Variables_10.vcxproj @@ -87,7 +87,7 @@ <AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>pcred.lib;pdh.lib;Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>pcred.lib;pdh.lib;Ws2_32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
@@ -114,7 +114,7 @@ <AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>pcre.lib;pdh.lib;Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>pcre.lib;pdh.lib;Ws2_32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
@@ -140,7 +140,7 @@ <ExceptionHandling>false</ExceptionHandling>
</ClCompile>
<Link>
- <AdditionalDependencies>pcre.lib;pdh.lib;Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>pcre.lib;pdh.lib;Ws2_32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<OptimizeReferences>true</OptimizeReferences>
@@ -168,7 +168,7 @@ <ExceptionHandling>false</ExceptionHandling>
</ClCompile>
<Link>
- <AdditionalDependencies>pcred.lib;pdh.lib;Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>pcred.lib;pdh.lib;Ws2_32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<SubSystem>Windows</SubSystem>
diff --git a/plugins/Variables/Variables_11.vcxproj b/plugins/Variables/Variables_11.vcxproj index 576e79c52d..ea030eef88 100644 --- a/plugins/Variables/Variables_11.vcxproj +++ b/plugins/Variables/Variables_11.vcxproj @@ -91,7 +91,7 @@ <AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>pcred.lib;pdh.lib;Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>pcred.lib;pdh.lib;Ws2_32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
@@ -119,7 +119,7 @@ <AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
- <AdditionalDependencies>pcre.lib;pdh.lib;Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>pcre.lib;pdh.lib;Ws2_32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
@@ -144,7 +144,7 @@ <ExceptionHandling>false</ExceptionHandling>
</ClCompile>
<Link>
- <AdditionalDependencies>pcre.lib;pdh.lib;Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>pcre.lib;pdh.lib;Ws2_32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<OptimizeReferences>true</OptimizeReferences>
@@ -171,7 +171,7 @@ <ExceptionHandling>false</ExceptionHandling>
</ClCompile>
<Link>
- <AdditionalDependencies>pcred.lib;pdh.lib;Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>pcred.lib;pdh.lib;Ws2_32.lib;UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<SubSystem>Windows</SubSystem>
diff --git a/plugins/Variables/src/help.cpp b/plugins/Variables/src/help.cpp index 9e3ca13989..0f6d23b423 100644 --- a/plugins/Variables/src/help.cpp +++ b/plugins/Variables/src/help.cpp @@ -903,8 +903,7 @@ static INT_PTR CALLBACK helpDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l tci.mask = TCIF_TEXT|TCIF_PARAM;
tci.pszText = TranslateT("Tokens");
hPage = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_TOKENS_DIALOG), hwndDlg, tokenHelpDlgProc, (LPARAM)GetParent(hwndDlg));
- if (pfnEnableThemeDialogTexture)
- pfnEnableThemeDialogTexture(hPage, ETDT_ENABLETAB);
+ EnableThemeDialogTexture(hPage, ETDT_ENABLETAB);
tci.lParam = (LPARAM)hPage;
MoveWindow(hPage, (rcTabs.left - rcParent.left), (rcTabs.top - rcParent.top), (rcTabs.right - rcTabs.left) - 2*iFrameX, (rcTabs.bottom - rcTabs.top) - 2*iFrameY, TRUE);
@@ -917,9 +916,8 @@ static INT_PTR CALLBACK helpDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l tci.mask = TCIF_TEXT|TCIF_PARAM;
tci.pszText = TranslateT("Input");
dat->hwndInputDlg = hPage = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_INPUT_DIALOG), hwndDlg, inputDlgProc, (LPARAM)GetParent(hwndDlg));
- if (pfnEnableThemeDialogTexture) {
- pfnEnableThemeDialogTexture(hPage, ETDT_ENABLETAB);
- }
+ EnableThemeDialogTexture(hPage, ETDT_ENABLETAB);
+
tci.lParam = (LPARAM)hPage;
MoveWindow(hPage, (rcTabs.left - rcParent.left), (rcTabs.top - rcParent.top), (rcTabs.right - rcTabs.left) - 2*iFrameX, (rcTabs.bottom - rcTabs.top) - 2*iFrameY, TRUE);
ShowWindow(hPage, SW_HIDE);
@@ -954,9 +952,7 @@ static INT_PTR CALLBACK helpDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l ((dat->vhs->flags&VHF_INPUT) && (((dat->vhs->fi != NULL) && (dat->vhs->fi->hContact != NULL)) || (dat->vhs->flags&VHF_SETLASTSUBJECT)))) {
// subject window is created, but not necessarily shown
dat->hwndSubjectDlg = hPage = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_CLIST_DIALOG), hwndDlg, clistDlgProc, (LPARAM)GetParent(hwndDlg));
- if (pfnEnableThemeDialogTexture) {
- pfnEnableThemeDialogTexture(hPage, ETDT_ENABLETAB);
- }
+ EnableThemeDialogTexture(hPage, ETDT_ENABLETAB);
MoveWindow(hPage, (rcTabs.left - rcParent.left), (rcTabs.top - rcParent.top), (rcTabs.right - rcTabs.left) - 2*iFrameX, (rcTabs.bottom - rcTabs.top) - 2*iFrameY, TRUE);
ShowWindow(hPage, SW_HIDE);
@@ -979,8 +975,7 @@ static INT_PTR CALLBACK helpDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l ((dat->vhs->flags&VHF_INPUT) && (dat->vhs->fi != NULL) && (dat->vhs->fi->tszExtraText != NULL))) {
// extratext window is created, but not necessarily shown
dat->hwndExtraTextDlg = hPage = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_EXTRATEXT_DIALOG), hwndDlg, extratextDlgProc, (LPARAM)GetParent(hwndDlg));
- if (pfnEnableThemeDialogTexture)
- pfnEnableThemeDialogTexture(hPage, ETDT_ENABLETAB);
+ EnableThemeDialogTexture(hPage, ETDT_ENABLETAB);
MoveWindow(hPage, (rcTabs.left - rcParent.left), (rcTabs.top - rcParent.top), (rcTabs.right - rcTabs.left) - 2*iFrameX, (rcTabs.bottom - rcTabs.top) - 2*iFrameY, TRUE);
ShowWindow(hPage, SW_HIDE);
@@ -1009,8 +1004,7 @@ static INT_PTR CALLBACK helpDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l tci.mask = TCIF_TEXT|TCIF_PARAM;
tci.pszText = TranslateT("Help");
hPage = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_HELPINFO_DIALOG), hwndDlg, helpInfoDlgProc, (LPARAM)GetParent(hwndDlg));
- if (pfnEnableThemeDialogTexture)
- pfnEnableThemeDialogTexture(hPage, ETDT_ENABLETAB);
+ EnableThemeDialogTexture(hPage, ETDT_ENABLETAB);
tci.lParam = (LPARAM)hPage;
MoveWindow(hPage, (rcTabs.left - rcParent.left), (rcTabs.top - rcParent.top), (rcTabs.right - rcTabs.left) - 2*iFrameX, (rcTabs.bottom - rcTabs.top) - 2*iFrameY, TRUE);
diff --git a/plugins/Variables/src/variables.cpp b/plugins/Variables/src/variables.cpp index 1b94664d1a..4e7ce05647 100644 --- a/plugins/Variables/src/variables.cpp +++ b/plugins/Variables/src/variables.cpp @@ -19,7 +19,6 @@ #include "variables.h"
-BOOL (WINAPI *pfnEnableThemeDialogTexture)(HANDLE, DWORD) = 0;
static BOOL bWarningShown = FALSE; // unicode on ansi warning
/* some handles */
@@ -514,12 +513,6 @@ int LoadVarModule() // help dialog
hCurSplitNS = LoadCursor(NULL, IDC_SIZENS);
- if(IsWinVerXPPlus()) {
- HMODULE hUxTheme = GetModuleHandle(_T("uxtheme.dll"));
- if (hUxTheme)
- pfnEnableThemeDialogTexture = (BOOL (WINAPI *)(HANDLE, DWORD))GetProcAddress(hUxTheme, "EnableThemeDialogTexture");
- }
-
hShowHelpService = CreateServiceFunction(MS_VARS_SHOWHELP, showHelpService);
hShowHelpExService = CreateServiceFunction(MS_VARS_SHOWHELPEX, showHelpExService);
diff --git a/plugins/Variables/src/variables.h b/plugins/Variables/src/variables.h index e76387924a..21c8bdef59 100644 --- a/plugins/Variables/src/variables.h +++ b/plugins/Variables/src/variables.h @@ -135,7 +135,6 @@ struct ParseOptions { BOOL bStripAll;
};
-extern BOOL (WINAPI *pfnEnableThemeDialogTexture)(HANDLE, DWORD);
extern HINSTANCE hInst;
extern struct ParseOptions gParseOpts;
extern int hLangpack;
diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp index 65aee18a87..1f26449162 100644 --- a/plugins/YAMN/src/main.cpp +++ b/plugins/YAMN/src/main.cpp @@ -56,61 +56,8 @@ HGENMENU hMenuItemMain = 0; HGENMENU hMenuItemCont = 0;
HGENMENU hMenuItemContApp = 0;
-HMODULE hUxTheme = 0;
-BOOL (WINAPI *MyEnableThemeDialogTexture)(HANDLE, DWORD) = 0;
-
-// function pointers, use typedefs for casting to shut up the compiler when using GetProcAddress()
-
-typedef BOOL (WINAPI *PITA)();
-typedef HANDLE (WINAPI *POTD)(HWND, LPCWSTR);
-typedef UINT (WINAPI *PDTB)(HANDLE, HDC, int, int, RECT *, RECT *);
-typedef UINT (WINAPI *PCTD)(HANDLE);
-typedef UINT (WINAPI *PDTT)(HANDLE, HDC, int, int, LPCWSTR, int, DWORD, DWORD, RECT *);
-
-PITA pfnIsThemeActive = 0;
-POTD pfnOpenThemeData = 0;
-PDTB pfnDrawThemeBackground = 0;
-PCTD pfnCloseThemeData = 0;
-PDTT pfnDrawThemeText = 0;
-
#define FIXED_TAB_SIZE 100 // default value for fixed width tabs
-/*
- * visual styles support (XP+)
- * returns 0 on failure
- */
-
-int InitVSApi()
-{
- if ((hUxTheme = LoadLibraryA("uxtheme.dll")) == 0)
- return 0;
-
- pfnIsThemeActive = (PITA)GetProcAddress(hUxTheme, "IsThemeActive");
- pfnOpenThemeData = (POTD)GetProcAddress(hUxTheme, "OpenThemeData");
- pfnDrawThemeBackground = (PDTB)GetProcAddress(hUxTheme, "DrawThemeBackground");
- pfnCloseThemeData = (PCTD)GetProcAddress(hUxTheme, "CloseThemeData");
- pfnDrawThemeText = (PDTT)GetProcAddress(hUxTheme, "DrawThemeText");
-
- MyEnableThemeDialogTexture = (BOOL (WINAPI *)(HANDLE, DWORD))GetProcAddress(hUxTheme, "EnableThemeDialogTexture");
- if (pfnIsThemeActive != 0 && pfnOpenThemeData != 0 && pfnDrawThemeBackground != 0 && pfnCloseThemeData != 0 && pfnDrawThemeText != 0)
- return 1;
-
- return 0;
-}
-
-/*
- * unload uxtheme.dll
- */
-
-int FreeVSApi()
-{
- if (hUxTheme != 0)
- FreeLibrary(hUxTheme);
- return 0;
-}
-
-//--------------------------------------------------------------------------------------------------
-
static void GetProfileDirectory(TCHAR *szPath, int cbPath)
//This is copied from Miranda's sources. In 0.2.1.0 it is needed, in newer vesions of Miranda use MS_DB_GETPROFILEPATH service
{
@@ -386,7 +333,6 @@ extern "C" int __declspec(dllexport) Load(void) LoadIcons();
LoadPlugins();
- InitVSApi();
HOTKEYDESC hkd = {0};
hkd.cbSize = sizeof(hkd);
@@ -432,8 +378,6 @@ extern "C" int __declspec(dllexport) Unload(void) CloseHandle(WriteToFileEV);
CloseHandle(ExitEV);
- FreeVSApi();
-
DeleteCriticalSection(&AccountStatusCS);
DeleteCriticalSection(&FileWritingCS);
DeleteCriticalSection(&PluginRegCS);
|