Send the creation notification to the true owner of the tooltip.

This commit is contained in:
Gerard Patel 2001-01-09 20:50:13 +00:00 committed by Alexandre Julliard
parent b3da1ac0cd
commit d834e4c858
1 changed files with 6 additions and 5 deletions

View File

@ -1210,14 +1210,15 @@ COMCTL32_CreateToolTip(HWND hwndOwner)
if (hwndToolTip)
{
NMTOOLTIPSCREATED nmttc;
nmttc.hdr.hwndFrom = hwndOwner;
nmttc.hdr.idFrom = GetWindowLongA(hwndOwner, GWL_ID);
/* true owner can be different if hwndOwner is a child window */
HWND hwndTrueOwner = GetWindow(hwndToolTip, GW_OWNER);
nmttc.hdr.hwndFrom = hwndTrueOwner;
nmttc.hdr.idFrom = GetWindowLongA(hwndTrueOwner, GWL_ID);
nmttc.hdr.code = NM_TOOLTIPSCREATED;
nmttc.hwndToolTips = hwndToolTip;
SendMessageA(GetParent(hwndOwner), WM_NOTIFY,
(WPARAM)GetWindowLongA(hwndOwner, GWL_ID),
SendMessageA(GetParent(hwndTrueOwner), WM_NOTIFY,
(WPARAM)GetWindowLongA(hwndTrueOwner, GWL_ID),
(LPARAM)&nmttc);
}