diff options
Diffstat (limited to 'win32/PlatWin.cxx')
-rw-r--r-- | win32/PlatWin.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index ab71dbe77..d9a0962ad 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -27,7 +27,7 @@ // We want to use multi monitor functions, but via LoadLibrary etc // Luckily microsoft has done the heavy lifting for us, so we'll just use their stub functions! -#if defined(_MSC_VER) || defined(__BORLANDC__) +#if (defined(_MSC_VER) && (MSC_VER > 1200)) || defined(__BORLANDC__) #define COMPILE_MULTIMON_STUBS #include "MultiMon.h" #endif @@ -1041,6 +1041,8 @@ void Window::SetPositionRelative(PRectangle rc, Window w) { ::GetWindowRect(reinterpret_cast<HWND>(w.GetID()), &rcOther); rc.Move(rcOther.left, rcOther.top); + // This #ifdef is for VC 98 which has problems with MultiMon.h under some conditions. +#ifdef MONITOR_DEFAULTTONULL // We're using the stub functionality of MultiMon.h to decay gracefully on machines // (ie, pre Win2000, Win95) that do not support the newer functions. RECT rcMonitor; @@ -1064,6 +1066,7 @@ void Window::SetPositionRelative(PRectangle rc, Window w) { rc.Move(mi.rcWork.left - rc.left, 0); if (rc.top < mi.rcWork.top) rc.Move(0, mi.rcWork.top - rc.top); +#endif } SetPosition(rc); } @@ -1148,6 +1151,7 @@ void Window::SetTitle(const char *s) { /* Returns rectangle of monitor pt is on, both rect and pt are in Window's coordinates */ PRectangle Window::GetMonitorRect(Point pt) { +#ifdef MONITOR_DEFAULTTONULL // MonitorFromPoint and GetMonitorInfo are not available on Windows 95 so are not used. // There could be conditional code and dynamic loading in a future version // so this would work on those platforms where they are available. @@ -1167,6 +1171,9 @@ PRectangle Window::GetMonitorRect(Point pt) { } else { return PRectangle(); } +#else + return PRectangle(); +#endif } struct ListItemData { |