That's intersting. I wonder why it's not working?
I wrote a sample using the exact code I posted here. Works fine using
VS2003.
AliR.
"AliR (VC++ MVP)" <AliR@online.nospam> ????????
news:He%2i.2986$y_7.1840@newssvr27.news.prodigy.net...
In your Dialogs PreTranslateMessage method where you are calling
m_ToolTip.RelayEvent(...)
Change it to this:
MSG msg = *pMsg;
msg.hwnd = (HWND)m_ToolTip.SendMessage(TTM_WINDOWFROMPOINT, 0,
(LPARAM)&msg.pt);
TTM_WINDOWFROMPOINT message can not get the disabled control windows
handle.
I use ChildWindowFromPointEx instead. This function can find the disabled
control, and it can ignore the invisible control.
CPoint pt = pMsg->pt;
if (msg.message >= WM_MOUSEFIRST && msg.message <= WM_MOUSELAST)
::ScreenToClient(msg.hwnd, &pt);
msg.lParam = MAKELONG(pt.x, pt.y);
// Let the ToolTip process this message.
m_ToolTip.RelayEvent(&msg);
AliR.
"fiveight" <fiveight@tom.com> wrote in message
news:CED1EB4E-A29B-42E8-AD7B-F496777F5165@microsoft.com...
Hi All:
Chinese English following!
I add a CToolTipCtrl member in my dialog, and create it in OnInitDialog
function, at last, I add a CEdit control to CToolTipCtrl member.When the
CEdit control is enabled, tool tip can pop up normally, but when the
CEdit
control is disabled, tool tip can't pop up. How can I solve this
problem?
Thanks.
Fiveight