Re: Save Text from CEdit box?
- From: "Ajay Kalra" <ajaykalra@xxxxxxxxx>
- Date: 20 Sep 2006 14:02:56 -0700
Can someone give me some tips or point me to a tutorial to save the text from
a CEdit box to a file(txt file)? I've spent a lot of time on this already
with no solid results.
Something like:
void SaveTextFromCEdit(CEdit* pEdit, CString fileName)
{
ASSERT_VALID(pEdit);
CString str;
pEdit->GetWindowText(str);
CStdioFile file;
if((str.GetLength() > 0) && file.Open(fileName,
CFile::modeCreate|CFile::modeWrite))
{
file.WriteString(str);
file.Close();
}
}
---
Ajay
.
- Prev by Date: Re: path of a text file...
- Next by Date: Re: Messages in MFC
- Previous by thread: path of a text file...
- Next by thread: Re: Save Text from CEdit box?
- Index(es):