I'm using Borland C++ builder....for the first time.
I'm writing a quick application that will use Borlands standard "Open Dialog" component that will prompt the user with a list of file names to open via a very standard file open dialog box. The file name is returned in AnsiString format. I then need to take the filename and use it in a function that requires a LPTSTR that points to the string that contains the filename.
LPTSTR is a 32-bit pointer to a character string that is portable for Unicode.
Question: How do I convert the AnsiString to a Unicode string that is pointed to by a LPTSTR.
Here is my code to bring up the dialog box and get the filename (in AnsiString format).
AnsiString strFilename;
OpenDialog1->Execute;
strFilename=OpenDialog1->FileName;
Help??!!
I'm writing a quick application that will use Borlands standard "Open Dialog" component that will prompt the user with a list of file names to open via a very standard file open dialog box. The file name is returned in AnsiString format. I then need to take the filename and use it in a function that requires a LPTSTR that points to the string that contains the filename.
LPTSTR is a 32-bit pointer to a character string that is portable for Unicode.
Question: How do I convert the AnsiString to a Unicode string that is pointed to by a LPTSTR.
Here is my code to bring up the dialog box and get the filename (in AnsiString format).
AnsiString strFilename;
OpenDialog1->Execute;
strFilename=OpenDialog1->FileName;
Help??!!