From 783ba1f8e28e5ce0bb50e0b90a6e390095c2053a Mon Sep 17 00:00:00 2001 From: sje Date: Mon, 29 Jan 2007 22:40:51 +0000 Subject: 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 --- yapp/YAPP.mdsp | 6 +++--- yapp/popups2_8.vcproj | 4 ++++ yapp/popwin.cpp | 6 ++++-- yapp/version.h | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/yapp/YAPP.mdsp b/yapp/YAPP.mdsp index 14a0f13..b6c4415 100644 --- a/yapp/YAPP.mdsp +++ b/yapp/YAPP.mdsp @@ -108,7 +108,7 @@ extraResourceOptions= 1=popups2.rc 2=version.rc [History] -popwin.cpp,0 -popup_history.cpp,2330 common.h,2437 -version.h,797 +popup_history.cpp,2330 +popwin.cpp,0 +version.h,765 diff --git a/yapp/popups2_8.vcproj b/yapp/popups2_8.vcproj index f4bdc33..d2da507 100644 --- a/yapp/popups2_8.vcproj +++ b/yapp/popups2_8.vcproj @@ -244,6 +244,10 @@ /> + + 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"); } } diff --git a/yapp/version.h b/yapp/version.h index 14f9979..f929068 100644 --- a/yapp/version.h +++ b/yapp/version.h @@ -4,7 +4,7 @@ #define __MAJOR_VERSION 0 #define __MINOR_VERSION 2 #define __RELEASE_NUM 1 -#define __BUILD_NUM 2 +#define __BUILD_NUM 3 #define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM #define __FILEVERSION_STRING_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM -- cgit v1.2.3