OnToolHitTest not called for CStatic derived control

I'm really stuck on this.

OnToolHitTest() is never called in my class. I have done the following:

void CustomStatic::PreSubclassWindow()
{
CStatic::PreSubclassWindow();
EnableToolTips();
}

In my class declaration I have:

protected:
virtual void PreSubclassWindow();
virtual int OnToolHitTest(CPoint point, TOOLINFO * pTI) const;
afx_msg BOOL OnTooltipNotify(UINT id, NMHDR *pNMHDR, LRESULT *pResult);



Answer this question

OnToolHitTest not called for CStatic derived control

  • banjaxed

    This is normal because a CStatic returns the return code for transparant on WM_NCHITEST, try the style SS_NOTIFY

  • Nilesh Hirpara

    Thank you very much everything is happy now :)
  • OnToolHitTest not called for CStatic derived control