winhelp: pointer coordinates are relative to richedit text window, not the main window
Kirill K. Smirnov
lich at math.spbu.ru
Thu May 8 08:08:38 CDT 2008
-------------- next part --------------
diff --git a/programs/winhelp/winhelp.c b/programs/winhelp/winhelp.c
index ee21053..27d46e1 100644
--- a/programs/winhelp/winhelp.c
+++ b/programs/winhelp/winhelp.c
@@ -1001,7 +1001,8 @@ static LRESULT CALLBACK WINHELP_MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
}
pt.x = (int)(short)LOWORD(msgf->lParam);
pt.y = (int)(short)HIWORD(msgf->lParam);
- ClientToScreen(hWnd, &pt);
+ hTextWnd = GetDlgItem(win->hMainWnd, CTL_ID_TEXT);
+ ClientToScreen(hTextWnd, &pt);
TrackPopupMenu(GetSubMenu(hMenu, 0), TPM_LEFTALIGN|TPM_TOPALIGN,
pt.x, pt.y, 0, hWnd, NULL);
DestroyMenu(hMenu);
More information about the wine-patches
mailing list