/*
StrRScan example
The following example uses an Open dialog box and a button on a form. When the button is clicked, the user is prompted for a filename. Then the filename, minus its path, is displayed in a message box.
Note:	This technique will not work with multi-byte character sets (MBCS). To be more general, use ExtractFileName.
*/
char* __fastcall GetFileName(char* pszFilePath)
{
  char* pszFileName = StrRScan(pszFilePath, '\\');
  if (!pszFileName)
    pszFileName = pszFilePath;
  else
    pszFileName++;
  return pszFileName;
}
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  if (OpenDialog1->Execute())
  Application->MessageBox(GetFileName(OpenDialog1->FileName.c_str()), 
"File Name", MB_OK);
} 
