Class types and casting at runtime

I have several components that I have extended with a "Modified" property,
which updates if the user changes anything, along with some other stuff. I
would like to check this property in a handler, but the handler is
registered by several of the different types of components, i.e. my JBEdit
control, my JBMemo control, etc. So, within my handler I have no way to
check the Modified property without doing a switch or if/then block because
I don't knpw what type my Sender is.

Is there a way I can look at the value of my Modified flag in my handler
when I do not know the type of the calling component? Can I cast it to a
dynamically revelealed type? like (hypothetically):

void __fastcall MyCallback(TObject* Sender)
{
  if ( ((classtype(Sender))Sender)->Modified ) {
    DoStuff();
  }

Quote
}

or how about:

if ((dynamic_cast<(typeid(*Sender))>Sender)->Modified) {
    DoStuff();

Quote
}

jon