Buena pregunta, al parecer en C++
es distinto, no hay operador
is.
Aquí ya no tengo el C++ para probar pero intentemos a ciegas:
Código:
TShape * __fastcall TForm1::FindShape(TPoint Pos)
{
integer i;
for (i = 0; i < this->ComponentCount; i++)
{
if (dynamic_cast<TShape *>(this->Components[i]))
{
if PtInRect(((TShape *)this->Components[i])->BoundsRect, Pos)
{
return ((TShape *)this->Components[i]);
}
}
}
return NULL;
}
// Saludos