diff options
author | (no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> | 2010-10-05 06:02:11 +0000 |
---|---|---|
committer | (no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> | 2010-10-05 06:02:11 +0000 |
commit | f1c2d0f970b708aa26ab14dc79523b81b65b4b53 (patch) | |
tree | 87d81e8f805e2f45f2b758b9768e95b61e0ed888 /tipper/popwin.cpp | |
parent | cda4bce6aea57e3c131e281551ad0b3f9f907932 (diff) |
Improved compatibility with Win9x
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@544 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'tipper/popwin.cpp')
-rw-r--r-- | tipper/popwin.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tipper/popwin.cpp b/tipper/popwin.cpp index 6e8ac5c..d0cbf4f 100644 --- a/tipper/popwin.cpp +++ b/tipper/popwin.cpp @@ -877,25 +877,25 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa SetWindowRgn(hwnd,hRgn1,FALSE);
}
return TRUE;
+
case PUM_CALCPOS:
{
RECT wa_rect, r;
- HMONITOR hMonitor;
- hMonitor = MonitorFromPoint(pwd->clcit.ptCursor, MONITOR_DEFAULTTONEAREST);
-
- MONITORINFO mi;
- mi.cbSize = sizeof(mi);
- GetMonitorInfo(hMonitor, &mi);
-
- wa_rect = mi.rcWork;
+ SystemParametersInfo(SPI_GETWORKAREA, 0, &wa_rect, FALSE);
+ if (MyMonitorFromPoint)
+ {
+ HMONITOR hMon = MyMonitorFromPoint(pwd->clcit.ptCursor, MONITOR_DEFAULTTONEAREST);
+ MONITORINFO mi;
+ mi.cbSize = sizeof(mi);
+ if (MyGetMonitorInfo(hMon, &mi))
+ wa_rect = mi.rcWork;
+ }
GetWindowRect(hwnd, &r);
CURSORINFO ci = {sizeof(CURSORINFO)};
GetCursorInfo(&ci);
-
-
int x = 0, y = 0, width = (r.right - r.left), height = (r.bottom - r.top);
|