int SubItemHitTest( LPLVHITTESTINFO pInfo );
Return Value
The one-based index of the item, or subitem, being tested (if any), or -1 otherwise.
Parameters
pInfo
A pointer to the LVHITTESTINFO structure.
Remarks
This member function implements the behavior of the Win32 macro, ListView_SubItemHitTest, as described in the Platform SDK.
Example
// The pointer to my list view control.
extern CListCtrl* pmyListCtrl;
// The pointer where the mouse was clicked.
extern CPoint myPoint;
LVHITTESTINFO lvhti;
// Clear the subitem text the user clicked on.
lvhti.pt = myPoint;
pmyListCtrl->SubItemHitTest(&lvhti);
if (lvhti.flags & LVHT_ONITEMLABEL)
{
pmyListCtrl->SetItemText(lvhti.iItem, lvhti.iSubItem, NULL);
}