Hola aguml.
Fijate si te sirve esta propuesta.
.h
Código PHP:
...
class TForm1 : public TForm
{
__published:
TComboBox *ComboBox1;
TStatusBar *StatusBar1;
void __fastcall FormCreate(TObject *Sender);
private:
void __fastcall AppIdle(TObject *Sender, bool &done);
public:
__fastcall TForm1(TComponent* Owner);
};
...
.cpp
Código PHP:
...
void __fastcall TForm1::AppIdle(TObject *Sender, bool &done)
{
TPoint pt;
HWND HWL;
GetCursorPos( &pt );
HWL = WindowFromPoint( pt );
if ( HWL != 0 )
{
StatusBar1->SimpleText = "";
char buff[128];
GetClassName( HWL, buff, sizeof( buff ) );
if ( StrIComp( buff, "ComboLBox" ) == 0 )
{
::ScreenToClient( HWL, &pt );
int inx = LOWORD( SendMessage( HWL, LB_ITEMFROMPOINT, 0,
(LPARAM)(pt.y * 65535 + pt.x)) );
if ( inx >= 0 )
StatusBar1->SimpleText = IntToStr(inx) + " " +
ComboBox1->Items->Strings[inx];
}
}
}
void __fastcall TForm1::FormCreate(TObject *Sender)
{
Application->OnIdle = AppIdle;
ComboBox1->Items->CommaText =
"cero,uno,dos,tres,cuatro,cinco,seis,siete,ocho,nueve";
ComboBox1->DropDownCount = 10;
}
...
Salida:
Saludos