HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Saving Text

04-08-2008, 07:36 PM#1
TheSecretArts
How would one go about saving the contents of a textbox to a specified file?
04-08-2008, 07:59 PM#2
Skater
What is your question?
1.How to save a text into a file( Which Language)?
2.How to get the text from the textbox?
04-08-2008, 08:16 PM#3
TheSecretArts
how to save the text from a textbox to a utf-8 encoded .ai (plain text ai) file
04-08-2008, 08:30 PM#4
moyack
In VB6 (and other languajes by sure) you can use the Microsoft scripting runtime (C:\Windows\System32\scrrun.dll) it offers good commands to manage text files and more....
04-08-2008, 08:34 PM#5
TheSecretArts
I forgot to specify a cpp solution
04-08-2008, 09:06 PM#6
moyack
well... this library must work on C++ too, so give a try.
04-09-2008, 01:34 AM#7
TheSecretArts
I might just use a file input stream and use that
How do I get the target save directory of a Save File Dialog?
04-09-2008, 02:30 AM#8
Vexorian
nevermind those silly lock ins.

use fprintf or fostream ?
04-09-2008, 10:13 AM#9
Toadcop
Code:
void InsertStringBX(FILE* fl,std::string s){
   int i=0;
   while(s[i])
   {
      fputc(s[++i],fl);
   }
}
fprintf - is fucked imo...
how to get from windows forms... idk i never tryed to use them in C++ =)
04-09-2008, 11:44 AM#10
TheSecretArts
im gonna def use fostream
04-09-2008, 11:56 AM#11
Vexorian
Quote:
fprintf - is fucked imo...
dunno about that, though in C++ I prefer stream objects anyways.