summaryrefslogtreecommitdiff
path: root/src/core/miranda.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-09-21 15:49:11 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-09-21 15:49:11 +0000
commit4e0aef28194077beaaaa07775f819c3a4cf934e9 (patch)
tree9790e7e37c3e3bac42fcdae8415cfc62e9574383 /src/core/miranda.cpp
parenteda233a99f1a74b1d43b2cc0fd41c0a874a7b3cd (diff)
using Uxtheme in core
git-svn-id: http://svn.miranda-ng.org/main/trunk@6158 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/core/miranda.cpp')
-rw-r--r--src/core/miranda.cpp89
1 files changed, 6 insertions, 83 deletions
diff --git a/src/core/miranda.cpp b/src/core/miranda.cpp
index 20d841f528..4ec80c2fe5 100644
--- a/src/core/miranda.cpp
+++ b/src/core/miranda.cpp
@@ -31,37 +31,8 @@ int LoadDefaultModules(void);
void UnloadNewPluginsModule(void);
void UnloadDefaultModules(void);
-pfnMyMonitorFromPoint MyMonitorFromPoint;
-pfnMyMonitorFromRect MyMonitorFromRect;
-pfnMyMonitorFromWindow MyMonitorFromWindow;
-pfnMyGetMonitorInfo MyGetMonitorInfo;
-
-typedef DWORD (WINAPI *pfnMsgWaitForMultipleObjectsEx)(DWORD, CONST HANDLE*, DWORD, DWORD, DWORD);
-pfnMsgWaitForMultipleObjectsEx msgWaitForMultipleObjectsEx;
-
-pfnSHAutoComplete shAutoComplete;
-pfnSHGetSpecialFolderPathA shGetSpecialFolderPathA;
-pfnSHGetSpecialFolderPathW shGetSpecialFolderPathW;
-
-pfnOpenInputDesktop openInputDesktop;
-pfnCloseDesktop closeDesktop;
-
-pfnAnimateWindow animateWindow;
-pfnSetLayeredWindowAttributes setLayeredWindowAttributes;
-
-pfnOpenThemeData openThemeData;
-pfnIsThemeBackgroundPartiallyTransparent isThemeBackgroundPartiallyTransparent;
-pfnDrawThemeParentBackground drawThemeParentBackground;
-pfnDrawThemeBackground drawThemeBackground;
-pfnDrawThemeText drawThemeText;
pfnDrawThemeTextEx drawThemeTextEx;
-pfnGetThemeBackgroundContentRect getThemeBackgroundContentRect;
-pfnGetThemeFont getThemeFont;
-pfnCloseThemeData closeThemeData;
-pfnEnableThemeDialogTexture enableThemeDialogTexture;
-pfnSetWindowTheme setWindowTheme;
pfnSetWindowThemeAttribute setWindowThemeAttribute;
-pfnIsThemeActive isThemeActive;
pfnBufferedPaintInit bufferedPaintInit;
pfnBufferedPaintUninit bufferedPaintUninit;
pfnBeginBufferedPaint beginBufferedPaint;
@@ -71,11 +42,6 @@ pfnGetBufferedPaintBits getBufferedPaintBits;
pfnDwmExtendFrameIntoClientArea dwmExtendFrameIntoClientArea;
pfnDwmIsCompositionEnabled dwmIsCompositionEnabled;
-LPFN_GETADDRINFO MyGetaddrinfo;
-LPFN_FREEADDRINFO MyFreeaddrinfo;
-LPFN_WSASTRINGTOADDRESSA MyWSAStringToAddress;
-LPFN_WSAADDRESSTOSTRINGA MyWSAAddressToString;
-
ITaskbarList3 * pTaskbarInterface;
HANDLE hOkToExitEvent, hModulesLoadedEvent;
@@ -232,45 +198,16 @@ int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR cmdLine, int)
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
#endif
- HINSTANCE hUser32 = GetModuleHandleA("user32");
- openInputDesktop = (pfnOpenInputDesktop)GetProcAddress (hUser32, "OpenInputDesktop");
- closeDesktop = (pfnCloseDesktop)GetProcAddress (hUser32, "CloseDesktop");
- msgWaitForMultipleObjectsEx = (pfnMsgWaitForMultipleObjectsEx)GetProcAddress(hUser32, "MsgWaitForMultipleObjectsEx");
- animateWindow = (pfnAnimateWindow)GetProcAddress(hUser32, "AnimateWindow");
- setLayeredWindowAttributes = (pfnSetLayeredWindowAttributes)GetProcAddress(hUser32, "SetLayeredWindowAttributes");
-
- MyMonitorFromPoint = (pfnMyMonitorFromPoint)GetProcAddress(hUser32, "MonitorFromPoint");
- MyMonitorFromRect = (pfnMyMonitorFromRect)GetProcAddress(hUser32, "MonitorFromRect");
- MyMonitorFromWindow = (pfnMyMonitorFromWindow)GetProcAddress(hUser32, "MonitorFromWindow");
- MyGetMonitorInfo = (pfnMyGetMonitorInfo)GetProcAddress(hUser32, "GetMonitorInfoW");
-
- HINSTANCE hShFolder = GetModuleHandleA("shell32");
- shGetSpecialFolderPathA = (pfnSHGetSpecialFolderPathA)GetProcAddress(hShFolder, "SHGetSpecialFolderPathA");
- shGetSpecialFolderPathW = (pfnSHGetSpecialFolderPathW)GetProcAddress(hShFolder, "SHGetSpecialFolderPathW");
- if (shGetSpecialFolderPathA == NULL) {
- HINSTANCE hShFolder = LoadLibraryA("ShFolder.dll");
- shGetSpecialFolderPathA = (pfnSHGetSpecialFolderPathA)GetProcAddress(hShFolder, "SHGetSpecialFolderPathA");
- shGetSpecialFolderPathW = (pfnSHGetSpecialFolderPathW)GetProcAddress(hShFolder, "SHGetSpecialFolderPathW");
- }
-
- shAutoComplete = (pfnSHAutoComplete)GetProcAddress(GetModuleHandleA("shlwapi"), "SHAutoComplete");
-
- if ( IsWinVerXPPlus()) {
+ if ( IsWinVerVistaPlus()) {
+ HINSTANCE hDwmApi = LoadLibraryA("dwmapi.dll");
+ if (hDwmApi) {
+ dwmExtendFrameIntoClientArea = (pfnDwmExtendFrameIntoClientArea)GetProcAddress(hDwmApi, "DwmExtendFrameIntoClientArea");
+ dwmIsCompositionEnabled = (pfnDwmIsCompositionEnabled)GetProcAddress(hDwmApi, "DwmIsCompositionEnabled");
+ }
HINSTANCE hThemeAPI = LoadLibraryA("uxtheme.dll");
if (hThemeAPI) {
- openThemeData = (pfnOpenThemeData)GetProcAddress(hThemeAPI, "OpenThemeData");
- isThemeBackgroundPartiallyTransparent = (pfnIsThemeBackgroundPartiallyTransparent)GetProcAddress(hThemeAPI, "IsThemeBackgroundPartiallyTransparent");
- drawThemeParentBackground = (pfnDrawThemeParentBackground)GetProcAddress(hThemeAPI, "DrawThemeParentBackground");
- drawThemeBackground = (pfnDrawThemeBackground)GetProcAddress(hThemeAPI, "DrawThemeBackground");
- drawThemeText = (pfnDrawThemeText)GetProcAddress(hThemeAPI, "DrawThemeText");
drawThemeTextEx = (pfnDrawThemeTextEx)GetProcAddress(hThemeAPI, "DrawThemeTextEx");
- getThemeBackgroundContentRect = (pfnGetThemeBackgroundContentRect)GetProcAddress(hThemeAPI , "GetThemeBackgroundContentRect");
- getThemeFont = (pfnGetThemeFont)GetProcAddress(hThemeAPI, "GetThemeFont");
- closeThemeData = (pfnCloseThemeData)GetProcAddress(hThemeAPI, "CloseThemeData");
- enableThemeDialogTexture = (pfnEnableThemeDialogTexture)GetProcAddress(hThemeAPI, "EnableThemeDialogTexture");
- setWindowTheme = (pfnSetWindowTheme)GetProcAddress(hThemeAPI, "SetWindowTheme");
setWindowThemeAttribute = (pfnSetWindowThemeAttribute)GetProcAddress(hThemeAPI, "SetWindowThemeAttribute");
- isThemeActive = (pfnIsThemeActive)GetProcAddress(hThemeAPI, "IsThemeActive");
bufferedPaintInit = (pfnBufferedPaintInit)GetProcAddress(hThemeAPI, "BufferedPaintInit");
bufferedPaintUninit = (pfnBufferedPaintUninit)GetProcAddress(hThemeAPI, "BufferedPaintUninit");
beginBufferedPaint = (pfnBeginBufferedPaint)GetProcAddress(hThemeAPI, "BeginBufferedPaint");
@@ -279,20 +216,6 @@ int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR cmdLine, int)
}
}
- if ( IsWinVerVistaPlus()) {
- HINSTANCE hDwmApi = LoadLibraryA("dwmapi.dll");
- if (hDwmApi) {
- dwmExtendFrameIntoClientArea = (pfnDwmExtendFrameIntoClientArea)GetProcAddress(hDwmApi, "DwmExtendFrameIntoClientArea");
- dwmIsCompositionEnabled = (pfnDwmIsCompositionEnabled)GetProcAddress(hDwmApi, "DwmIsCompositionEnabled");
- }
- }
-
- HMODULE hWinSock = GetModuleHandleA("ws2_32");
- MyGetaddrinfo = (LPFN_GETADDRINFO)GetProcAddress(hWinSock, "getaddrinfo");
- MyFreeaddrinfo = (LPFN_FREEADDRINFO)GetProcAddress(hWinSock, "freeaddrinfo");
- MyWSAStringToAddress = (LPFN_WSASTRINGTOADDRESSA)GetProcAddress(hWinSock, "WSAStringToAddressA");
- MyWSAAddressToString = (LPFN_WSAADDRESSTOSTRINGA)GetProcAddress(hWinSock, "WSAAddressToStringA");
-
if (bufferedPaintInit)
bufferedPaintInit();