If you want your edit control's OnToolTipNotify() to be called then you'll
need to use ON_NOTIFY_REFLECT in the control's message map. Note that the
handler function return value changes to void.
On Jul 21, 1:08 am, "Mark Salsbery" <msalsb...@sbcglobal.net> wrote:
I see your class declaration but what's going on in the implementation?
How is your OnToolTipNotify() method getting called?
Mark
--
Mark Salsbery
Microsoft MVP - Visual C++
<przemyslaw.sl...@gazeta.pl> wrote in message
news:1184972830.203511.41870@n2g2000hse.googlegroups.com...
Hello,
Thanks for answer, I have already said I have no problem with the
tooltips when I use CEdit control, The tooltip is shown, however, when
I switch to the derived class (describved in the previous post), the
nessage is not handled properly. This is the main problem. In general
I know how to implament tooltips.
I am rather having probs wiht the message, when the mouse pointer is
dragged for the first time over the control, not permanently when it
is moved.
Thanks for suggestions
This is the main problem, when I set a breakpoint in this function it
is never hit for the derived class.
this is the implementation:
BOOL CDerivedEdit::OnToolTipNotify(UINT id, NMHDR *pNMHDR, LRESULT
*pResult)
{
TOOLTIPTEXT *pText = (TOOLTIPTEXT *)pNMHDR;
int Id = ::GetDlgCtrlID((HWND)pNMHDR->idFrom);
if(Id)
{
if(!GetDlgItem(Id)->IsWindowEnabled())
return FALSE;
pText->lpszText = MAKEINTRESOURCE(Id);
pText->hinst = AfxGetInstanceHandle();
return TRUE;
}
return FALSE;
}