Export (0) Print
Expand All

CListBox::ItemFromPoint

Determines the list-box item nearest the point specified in pt.

UINT ItemFromPoint(
   CPoint pt,
   BOOL& bOutside
) const;

pt

Point for which to find the nearest item, specified relative to the upper-left corner of the client area of the list box.

bOutside

Reference to a BOOL variable which will be set to TRUE if pt is outside the client area of the nearest list box item, FALSE if pt is inside the client area of the nearest list box item.

The index of the nearest item to the point specified in pt.

You could use this function to determine which list-box item the mouse cursor moves over.

Header: afxwin.h

Show:
© 2014 Microsoft