Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2010
Visual Studio
Visual C++
MFC
MFC Classes
CWnd Class
 CWnd::OnToolHitTest
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2010/.NET Framework 4

Other versions are also available for the following:
Visual Studio 2010 - Visual C++
CWnd::OnToolHitTest

The framework calls this member function to detemine whether a point is in the bounding rectangle of the specified tool.

virtual INT_PTR OnToolHitTest(
   CPoint point,
   TOOLINFO* pTI 
) const;
point

Specifies the x- and y-coordinate of the cursor. These coordinates are always relative to the upper-left corner of the window

pTI

A pointer to a TOOLINFO structure. The following structure values are set by default:

  • hwnd = m_hWnd   Handle to a window

  • uId = (UINT)hWndChild   Handle to a child window

  • uFlags |= TTF_IDISHWND   Handle of the tool

  • lpszText = LPSTR_TEXTCALLBACK   Pointer to the string that is to be displayed in the specified window

If the tooltip control was found, the window control ID. If the tooltip control was not found, -1.

If the point is in the rectangle, it retrieves information about the tool.

If the area with which the tooltip is associated is not a button, OnToolHitTest sets the structure flags to TTF_NOTBUTTON and TTF_CENTERTIP.

Override OnToolHitTest to provide different information than the default provides.

See TOOLINFO, in the Windows SDK, for more information about the structure.

Header: afxwin.h

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker