ListView_SubItemHitTestEx macro (commctrl.h)

Determines which list-view item or subitem is located at a given position. You can use this macro or send the LVM_SUBITEMHITTEST message explicitly.

Syntax

INT ListView_SubItemHitTestEx(
   HWND            hwnd,
   LPLVHITTESTINFO plvhti
);

Parameters

hwnd

Type: HWND

A handle to the list-view control that will be hit-tested.

plvhti

Type: LPLVHITTESTINFO

A pointer to an LVHITTESTINFO structure. The POINT structure within LVHITTESTINFO must be set to the client coordinates to be hit-tested.

Return value

Type: INT

Returns the index of the item or subitem tested, if any, or -1 otherwise. If an item or subitem is at the given coordinates, the fields of the LVHITTESTINFO structure will be filled with the applicable hit information.

Remarks

This macro passes -1 as the wparam of the message, specifying that the iGroup member of plvhti is retrieved.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header commctrl.h