Board index » cppbuilder » getting text from EditBox?

getting text from EditBox?


2003-12-17 11:40:02 PM
cppbuilder28
hi, how can I get the text that is typed into an Edit Box placed
into a char array or char * variable? For example, I have an Edit
Box where the user should type the path to a file. I need to output
that to a file, using write(). is there a better way? if not, then
how do i do this? thanks
 
 

Re:getting text from EditBox?

"peter" < XXXX@XXXXX.COM >wrote in message
Quote
I have an Edit Box where the user should type the path to a file.
I need to output that to a file, using write().
AnsiString str = Edit1->Text;
fwrite(str.c_str(), str.Length(), 1, myfile);
or
fwrite(str.c_str(), sizeof(char), str.Length(), myfile);
Gambit