From 4e0aef28194077beaaaa07775f819c3a4cf934e9 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 21 Sep 2013 15:49:11 +0000 Subject: using Uxtheme in core git-svn-id: http://svn.miranda-ng.org/main/trunk@6158 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/utils/utils.cpp | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) (limited to 'src/modules/utils/utils.cpp') 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); -- cgit v1.2.3