
(*
 Delphi Object and Component Reference
#{bmc bm9.BMP} Insert example
This code inserts a menu item after the first item in a menu named FileMenu:
*) 
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  TMenuItem!AL(`tmenuitem_object',1,`TopicNotFound',`main') *NewItem = new TMenuItem!AL(`tmenuitem_object',1,`TopicNotFound',`main')(FileMenu);
  try
  {
    NewItem->Caption = "Form1";
    FileMenu->Insert(1, NewItem);
  }
  catch (Exception &e)
  {
    delete NewItem;
    throw;
  }
}
 
