diff options
author | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-01-29 22:40:51 +0000 |
---|---|---|
committer | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-01-29 22:40:51 +0000 |
commit | 783ba1f8e28e5ce0bb50e0b90a6e390095c2053a (patch) | |
tree | 884ff359a5316b499a6d6d7632d1edc6be4451c7 /yapp/popwin.cpp | |
parent | 2f958f64f8cb93f22bf757437e462019cbe78231 (diff) |
dynamic load of MonitorFromRect func - not available on NT4
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@88 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'yapp/popwin.cpp')
-rw-r--r-- | yapp/popwin.cpp | 6 |
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");
}
}
|