/*
GetClass example
The following example allows users to type the name of a graphics class into an edit control and when a button is pressed, the name of the default extension for that class is displayed in another edit control.
*/
// in the form’s OnCreate event handler (or a similar place)
// you must register the graphics classes so that GetClass
// can find them
void __fastcall TForm1::FormCreate(TObject *Sender)
{
  TMetaClass *MetaClass = __classid(TIcon);
  RegisterClasses(&MetaClass, 0);
  MetaClass = __classid(Graphics::TBitmap);
  RegisterClasses(&MetaClass, 0);
  MetaClass = __classid(TMetafile);
  RegisterClasses(&MetaClass, 0);
}
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  Edit2->Text = GraphicExtension((TGraphicClass) GetClass(Edit1->Text));
} 
