From f1c2d0f970b708aa26ab14dc79523b81b65b4b53 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> Date: Tue, 5 Oct 2010 06:02:11 +0000 Subject: Improved compatibility with Win9x git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@544 4f64403b-2f21-0410-a795-97e2b3489a10 --- tipper/popwin.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'tipper/popwin.cpp') 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); -- cgit v1.2.3