Hello,
I have two problems, firt i'd like to know how to change the line when im writing into a fail, \n seems not to work (maybe im doing something wrong!).
The second problem is that,how can i make that work when the program writes a text into fail test.txt,after that a messagebox will be opened,and i want it with this text want the program did write to the fail test.txt, i know that i have to make some variables, but how?
here's my code:
void CTextDlg::OnCreateTxt()
{
CFile mFail;
mFail.Open("c:\\test.txt",CFile::modeWrite|CFile::modeCreate|CFile::shareDenyNone);
static const char write_text[] = "here is a example text\n"
"this would be the second line";
mFail.Write(write_text, lstrlen(write_text));
int message;
message = MessageBox("here would be the text what the program did just wrote to the fail test.txt", "Info", MB_OK);
mFail.Close();
}
thanx if somebody can help me
Silver
crach@jutukas.com
I have two problems, firt i'd like to know how to change the line when im writing into a fail, \n seems not to work (maybe im doing something wrong!).
The second problem is that,how can i make that work when the program writes a text into fail test.txt,after that a messagebox will be opened,and i want it with this text want the program did write to the fail test.txt, i know that i have to make some variables, but how?
here's my code:
void CTextDlg::OnCreateTxt()
{
CFile mFail;
mFail.Open("c:\\test.txt",CFile::modeWrite|CFile::modeCreate|CFile::shareDenyNone);
static const char write_text[] = "here is a example text\n"
"this would be the second line";
mFail.Write(write_text, lstrlen(write_text));
int message;
message = MessageBox("here would be the text what the program did just wrote to the fail test.txt", "Info", MB_OK);
mFail.Close();
}
thanx if somebody can help me
crach@jutukas.com