summaryrefslogtreecommitdiff
path: root/src/modules/utils
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/modules/utils
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/modules/utils')
-rw-r--r--src/modules/utils/hyperlink.cpp15
-rw-r--r--src/modules/utils/path.cpp4
-rw-r--r--src/modules/utils/utils.cpp25
3 files changed, 16 insertions, 28 deletions
diff --git a/src/modules/utils/hyperlink.cpp b/src/modules/utils/hyperlink.cpp
index ebb24b7c14..1fd17b8130 100644
--- a/src/modules/utils/hyperlink.cpp
+++ b/src/modules/utils/hyperlink.cpp
@@ -228,15 +228,12 @@ static LRESULT CALLBACK HyperlinkWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPA
textColor = dat->disableColor;
}
if (GetClientRect(hwnd, &rc) && GetWindowText(hwnd, szText, SIZEOF(szText))) {
- if (drawThemeParentBackground && IsWinVerXPPlus())
- {
- BOOL fSmoothing;
- UINT fSmoothingType;
- SystemParametersInfo(SPI_GETFONTSMOOTHING, 0, &fSmoothing, 0);
- SystemParametersInfo(SPI_GETFONTSMOOTHINGTYPE, 0, &fSmoothingType, 0);
- if (fSmoothing && fSmoothingType == FE_FONTSMOOTHINGCLEARTYPE)
- drawThemeParentBackground(hwnd, hdc, &rc);
- }
+ BOOL fSmoothing;
+ UINT fSmoothingType;
+ SystemParametersInfo(SPI_GETFONTSMOOTHING, 0, &fSmoothing, 0);
+ SystemParametersInfo(SPI_GETFONTSMOOTHINGTYPE, 0, &fSmoothingType, 0);
+ if (fSmoothing && fSmoothingType == FE_FONTSMOOTHINGCLEARTYPE)
+ DrawThemeParentBackground(hwnd, hdc, &rc);
SetBkMode(hdc, TRANSPARENT);
SetTextColor(hdc, textColor);
alignFlag = (GetWindowLongPtr(hwnd, GWL_STYLE)&(SS_CENTER|SS_RIGHT|SS_LEFT));
diff --git a/src/modules/utils/path.cpp b/src/modules/utils/path.cpp
index 40c591a1e4..8eebd9ef09 100644
--- a/src/modules/utils/path.cpp
+++ b/src/modules/utils/path.cpp
@@ -131,7 +131,7 @@ static __forceinline char *GetProfileDirX(char*)
static __forceinline char *SHGetSpecialFolderPathX(int iCSIDL, char* var)
{
char result[512];
- if (shGetSpecialFolderPathA && shGetSpecialFolderPathA(NULL, result, iCSIDL, FALSE))
+ if (SHGetSpecialFolderPathA(NULL, result, iCSIDL, FALSE))
return mir_strdup(result);
return NULL;
}
@@ -209,7 +209,7 @@ static __forceinline TCHAR *GetEnvironmentVariableX(TCHAR *variable)
static __forceinline TCHAR *SHGetSpecialFolderPathX(int iCSIDL, TCHAR* var)
{
TCHAR result[512];
- if (shGetSpecialFolderPath && shGetSpecialFolderPath(NULL, result, iCSIDL, FALSE))
+ if (SHGetSpecialFolderPath(NULL, result, iCSIDL, FALSE))
return mir_tstrdup(result);
return NULL;
}
diff --git a/src/modules/utils/utils.cpp b/src/modules/utils/utils.cpp
index 9807d18278..ddf2038da0 100644
--- a/src/modules/utils/utils.cpp
+++ b/src/modules/utils/utils.cpp
@@ -351,23 +351,14 @@ static INT_PTR AssertInsideScreen(WPARAM wParam, LPARAM lParam)
RECT rcScreen;
SystemParametersInfo(SPI_GETWORKAREA, 0, &rcScreen, FALSE);
- if (MyMonitorFromWindow)
- {
- if (MyMonitorFromRect(rc, MONITOR_DEFAULTTONULL))
- return 0;
-
- MONITORINFO mi = {0};
- HMONITOR hMonitor = MyMonitorFromRect(rc, MONITOR_DEFAULTTONEAREST);
- mi.cbSize = sizeof(mi);
- if (MyGetMonitorInfo(hMonitor, &mi))
- rcScreen = mi.rcWork;
- }
- else
- {
- RECT rcDest;
- if (IntersectRect(&rcDest, &rcScreen, rc))
- return 0;
- }
+ if (MonitorFromRect(rc, MONITOR_DEFAULTTONULL))
+ return 0;
+
+ MONITORINFO mi = {0};
+ HMONITOR hMonitor = MonitorFromRect(rc, MONITOR_DEFAULTTONEAREST);
+ mi.cbSize = sizeof(mi);
+ if (GetMonitorInfo(hMonitor, &mi))
+ rcScreen = mi.rcWork;
if (rc->top >= rcScreen.bottom)
OffsetRect(rc, 0, rcScreen.bottom - rc->bottom);