Click here to Skip to main content
15,926,939 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: data not write at .txt file Pin
Y_Kaushik2-Aug-07 23:19
Y_Kaushik2-Aug-07 23:19 
GeneralRe: data not write at .txt file Pin
Hamid_RT3-Aug-07 1:10
Hamid_RT3-Aug-07 1:10 
GeneralRe: data not write at .txt file Pin
Anurag Gandhi2-Aug-07 23:17
professionalAnurag Gandhi2-Aug-07 23:17 
QuestionRe: data not write at .txt file Pin
CPallini2-Aug-07 23:22
mveCPallini2-Aug-07 23:22 
GeneralRe: data not write at .txt file Pin
Hamid_RT3-Aug-07 1:10
Hamid_RT3-Aug-07 1:10 
AnswerRe: data not write at .txt file Pin
Anurag Gandhi2-Aug-07 23:14
professionalAnurag Gandhi2-Aug-07 23:14 
GeneralRe: data not write at .txt file Pin
Y_Kaushik2-Aug-07 23:31
Y_Kaushik2-Aug-07 23:31 
GeneralRe: data not write at .txt file Pin
Anurag Gandhi3-Aug-07 0:14
professionalAnurag Gandhi3-Aug-07 0:14 
I am simplifying my answer according to your need.

CStdioFile file;
if(!file.Open(lpszPathName,CFile::modeCreate | CFile::modeWrite, 0))
{
AfxMessageBox(CString("File cannot be Saved. Please Check if the file is read only."));
return;
}
CString strTextToSave = _T("This text will be saved to the file.");
file.WriteString(strTextToSave);
file.Close();

Hope it is clear.

For Your Information:
The code i have given you was from one of my project where I called FileSave function in CProjectDocument Class and was retriving the text from EditView Window.

Anurag Gandhi.
http://www.softgandhi.co.nr
Life is a computer program and every one is the programmer of his own life.

GeneralRe: data not write at .txt file Pin
Y_Kaushik3-Aug-07 1:55
Y_Kaushik3-Aug-07 1:55 
GeneralRe: data not write at .txt file Pin
Anurag Gandhi3-Aug-07 2:15
professionalAnurag Gandhi3-Aug-07 2:15 
GeneralRe: data not write at .txt file Pin
Y_Kaushik3-Aug-07 2:43
Y_Kaushik3-Aug-07 2:43 
GeneralRe: data not write at .txt file Pin
Anurag Gandhi3-Aug-07 19:40
professionalAnurag Gandhi3-Aug-07 19:40 
GeneralRe: data not write at .txt file Pin
Y_Kaushik3-Aug-07 21:59
Y_Kaushik3-Aug-07 21:59 
AnswerRe: data not write at .txt file Pin
CPallini2-Aug-07 23:42
mveCPallini2-Aug-07 23:42 
GeneralRe: data not write at .txt file Pin
Y_Kaushik3-Aug-07 0:10
Y_Kaushik3-Aug-07 0:10 
GeneralRe: data not write at .txt file Pin
CPallini3-Aug-07 0:22
mveCPallini3-Aug-07 0:22 
AnswerRe: data not write at .txt file Pin
David Crow3-Aug-07 3:43
David Crow3-Aug-07 3:43 
QuestionHow to import opengl programs in VC++? Pin
vikramkarthik2-Aug-07 22:39
vikramkarthik2-Aug-07 22:39 
AnswerRe: How to import opengl programs in VC++? Pin
Hamid_RT2-Aug-07 22:52
Hamid_RT2-Aug-07 22:52 
GeneralRe: How to import opengl programs in VC++? Pin
vikramkarthik2-Aug-07 22:57
vikramkarthik2-Aug-07 22:57 
GeneralRe: How to import opengl programs in VC++? Pin
Hamid_RT3-Aug-07 1:12
Hamid_RT3-Aug-07 1:12 
QuestionHow to get HTML output from *.asmx file Pin
Pankaj.Jain2-Aug-07 21:33
professionalPankaj.Jain2-Aug-07 21:33 
QuestionManually deleting the Menu Pin
Anu_Bala2-Aug-07 21:07
Anu_Bala2-Aug-07 21:07 
AnswerRe: Manually deleting the Menu Pin
Anurag Gandhi2-Aug-07 21:24
professionalAnurag Gandhi2-Aug-07 21:24 
AnswerRe: Manually deleting the Menu Pin
Roger Broomfield2-Aug-07 21:46
Roger Broomfield2-Aug-07 21:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.