Share via


CListBox::ItemFromPoint

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

Return Value

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

Parameters

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 list box, FALSE if pt is inside the client area of the list box.

Remarks

Call this function to determine the list-box item nearest the point specified in pt. You could use this function to determine which list-box item the mouse cursor moves over.

Note   Because the Win32 message LB_ITEMFROMPOINT works only with Windows 95, ItemFromPoint, which wraps the Win32 message also works only with Windows 95.

Example

See the example for CListBox::SetAnchorIndex.

CListBox OverviewClass MembersHierarchy Chart

See Also   CListBox::GetItemRect,