ExpandFileName (C++)

From Appmethod Code Examples
Jump to: navigation, search

Description

The following example uses a listbox, an edit control, and a button on a form. When you click the button, the filename specified in the edit control is expanded to a fully qualified filename and added to the list box.

Code

void __fastcall TForm1::Button1Click(TObject *Sender)
{
  ListBox1->Items->Add(ExpandFileName(Edit1->Text));
}
__fastcall TForm1::TForm1(TComponent* Owner)
  : TForm(Owner)
{
  Label2->Caption = ExtractFilePath(Application->ExeName);
}

Uses