How can I save what the user enters into an editbox to a text file (*.txt). Any suggestions?
Thanks,
Nathan Strandberg
Printable View
How can I save what the user enters into an editbox to a text file (*.txt). Any suggestions?
Thanks,
Nathan Strandberg
Example, using MFC:
// assume m_editBox is a CEdit;
// error checking omitted, code not tested
CString cText;
m_editBox.GetWindowText( cText );
CFile txtFile("EditBox.txt", CFile::modeCreate | CFile::modeWrite );
txtFile.Write( cText.GetBuffer(1), cText.GetLength() );
txtFile.Close();