summaryrefslogtreecommitdiff
path: root/yapp/popwin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'yapp/popwin.cpp')
-rw-r--r--yapp/popwin.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/yapp/popwin.cpp b/yapp/popwin.cpp
index 3e327b3..4edb028 100644
--- a/yapp/popwin.cpp
+++ b/yapp/popwin.cpp
@@ -7,6 +7,7 @@
HMODULE hUserDll;
BOOL (WINAPI *MySetLayeredWindowAttributes)(HWND,COLORREF,BYTE,DWORD) = 0;
BOOL (WINAPI *MyAnimateWindow)(HWND hWnd,DWORD dwTime,DWORD dwFlags) = 0;
+HMONITOR (WINAPI *MyMonitorFromRect)(LPCRECT rect, DWORD flags) = 0;
#define ID_CLOSETIMER 0x0101
#define ID_MOVETIMER 0x0102
@@ -16,11 +17,11 @@ int global_mouse_in = 0;
void SetStartValues() {
RECT wa_rect;
- if(options.use_mim_monitor) {
+ if(options.use_mim_monitor && MyMonitorFromRect) {
RECT clr;
HMONITOR hMonitor;
GetWindowRect((HWND)CallService(MS_CLUI_GETHWND, 0, 0), &clr);
- hMonitor = MonitorFromRect(&clr, MONITOR_DEFAULTTONEAREST);
+ hMonitor = MyMonitorFromRect(&clr, MONITOR_DEFAULTTONEAREST);
MONITORINFO mi;
mi.cbSize = sizeof(mi);
@@ -726,6 +727,7 @@ void InitWindowStack() {
if (hUserDll) {
MySetLayeredWindowAttributes = (BOOL (WINAPI *)(HWND,COLORREF,BYTE,DWORD))GetProcAddress(hUserDll, "SetLayeredWindowAttributes");
MyAnimateWindow=(BOOL (WINAPI*)(HWND,DWORD,DWORD))GetProcAddress(hUserDll,"AnimateWindow");
+ MyMonitorFromRect=(HMONITOR (WINAPI*)(LPCRECT,DWORD))GetProcAddress(hUserDll, "MonitorFromRect");
}
}