Help Center

CListBox.ItemFromPointmethod

Gets the zero-based index of the item nearest the specified point in a list box.

WindowsmethodCListBox.incdocumented

Syntax

FUNCTION ItemFromPoint (BYVAL hListBox AS HWND, BYVAL x AS SHORT, BYVAL y AS SHORT) AS LONG

Parameters

NameDescription
hListBoxThe handle of the listbox control.
xThe x-coordinate of a point, relative to the upper-left corner of the client area of the list box.
xThe y-coordinate of a point, relative to the upper-left corner of the client area of the list box.

Description

Gets the zero-based index of the item nearest the specified point in a list box.

Example

DIM index AS LONG = CListBox.ItemFromPoint(hListBox, x, y)

Reference

  • Include file CListBox.inc
  • Defined in AfxNova/CListBox.inc:394
  • Documented in Windows/WIndows Controls/CListBox Class.md
  • Topic: CListBox Class