Поделиться через


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.

Пример

See the example for CListBox::SetAnchorIndex.

Требования

Header: afxwin.h

См. также

Основные понятия

CListBox Class

CListBox Members

Hierarchy Chart

CListBox::GetItemRect

LB_ITEMFROMPOINT