Estoy viendo que este es el foro de C++ Builder así que por si hubiese dificultades voy a traducir el código que expone
ecfisa:
Código PHP:
String GetListViewSubItem(TListView *LV)
{
LVHITTESTINFO Info;
TListItem *Item;
int Index;
String Result = "";
Info.pt = LV->ScreenToClient(Mouse->CursorPos);
Index = ListView_SubItemHitTest(LV->Handle, &Info);
if(Index != -1){
Item = LV->Items->Item[Index];
if(Info.iSubItem == 0)
Result = Item->Caption;
else
Result = Item->SubItems->Strings[Info.iSubItem-1];
}
return Result;
}
Código PHP:
void __fastcall TForm1::ListViewClick(TObject *Sender)
{
Caption = GetListViewSubItem(ListView);
}
Saludos.