Click here to Skip to main content
15,891,372 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: missing header files Pin
prasad_som24-Sep-06 19:45
prasad_som24-Sep-06 19:45 
AnswerRe: missing header files Pin
Mridang Agarwalla24-Sep-06 20:34
Mridang Agarwalla24-Sep-06 20:34 
AnswerRe: missing header files Pin
Eytukan24-Sep-06 23:42
Eytukan24-Sep-06 23:42 
QuestionRe: missing header files Pin
Eytukan24-Sep-06 23:46
Eytukan24-Sep-06 23:46 
AnswerRe: missing header files Pin
Mridang Agarwalla25-Sep-06 19:30
Mridang Agarwalla25-Sep-06 19:30 
GeneralRe: missing header files Pin
Eytukan25-Sep-06 20:45
Eytukan25-Sep-06 20:45 
GeneralRe: missing header files Pin
Hamid_RT26-Sep-06 6:42
Hamid_RT26-Sep-06 6:42 
Questionproblem in storing in txt file Pin
With_problem24-Sep-06 18:15
With_problem24-Sep-06 18:15 
I am using this code to save data in txt file but i just dont understand what went wrong in that it saves all data rather then that market detail only.

<br />
<br />
CString csMarket="EURUSD";<br />
CString usMarket ="USDJPY";<br />
CString gbMarket="GBPUSD" ;<br />
<br />
if(csMarket == Market)   //,myfile.Open("EurUsd.txt",CFile.modeCreate | CFile.modeWrite)<br />
	{<br />
		 myfile.Open("EurUsd.txt",CFile.modeCreate | CFile.modeWrite);<br />
		// myfile.Write((LPCTSTR)m_MainEdit,m_MainEdit.GetLength()*sizeof(TCHAR));<br />
          <br />
		LPSTR buf;<br />
		int i= m_MainEdit.GetLength();<br />
		buf = m_MainEdit.GetBuffer(i);<br />
		myfile.Write(buf,i);<br />
		myfile.Close();<br />
		 <br />
	}<br />
    else if(strcmp( Market,"USDJPY") == 0) <br />
<br />
	// else if(usMarket == Market)<br />
	 {<br />
       myfile.Open("UsdJpy.txt",CFile.modeCreate | CFile.modeWrite);<br />
	   LPSTR buf1;<br />
	   int i = m_MainEdit.GetLength();<br />
	    buf1 = m_MainEdit.GetBuffer(i);<br />
	   myfile.Write(buf1,i);<br />
	   myfile.Close();<br />
	}<br />
<br />
	 else if(gbMarket == Market)<br />
	 {<br />
		 myfile.Open("GbpUsd.txt",CFile.modeCreate | CFile.modeWrite);<br />
		// myfile.Write((LPCTSTR)m_MainEdit,m_MainEdit.GetLength()*sizeof(TCHAR));<br />
		 <br />
		 LPSTR buf2;<br />
		 int i = m_MainEdit.GetLength();<br />
		 buf2 = m_MainEdit.GetBuffer(i);<br />
		 myfile.Write(buf2,i);<br />
		 myfile.Close();<br />
		 <br />
	 }<br />

AnswerRe: problem in storing in txt file Pin
Eytukan24-Sep-06 18:42
Eytukan24-Sep-06 18:42 
GeneralRe: problem in storing in txt file Pin
With_problem24-Sep-06 18:46
With_problem24-Sep-06 18:46 
GeneralRe: problem in storing in txt file Pin
Eytukan24-Sep-06 19:05
Eytukan24-Sep-06 19:05 
GeneralRe: problem in storing in txt file Pin
With_problem24-Sep-06 19:31
With_problem24-Sep-06 19:31 
GeneralRe: problem in storing in txt file Pin
Eytukan24-Sep-06 23:54
Eytukan24-Sep-06 23:54 
QuestionRe: problem in storing in txt file Pin
David Crow25-Sep-06 6:29
David Crow25-Sep-06 6:29 
AnswerRe: problem in storing in txt file Pin
With_problem26-Sep-06 16:37
With_problem26-Sep-06 16:37 
GeneralRe: problem in storing in txt file Pin
David Crow27-Sep-06 2:35
David Crow27-Sep-06 2:35 
Questionany good link for database? Pin
With_problem24-Sep-06 18:12
With_problem24-Sep-06 18:12 
AnswerRe: any good link for database? Pin
Hamid_RT24-Sep-06 18:15
Hamid_RT24-Sep-06 18:15 
AnswerRe: any good link for database? Pin
ThatsAlok4-Oct-06 7:58
ThatsAlok4-Oct-06 7:58 
Generalexception handeling Pin
Bram van Kampen24-Sep-06 14:08
Bram van Kampen24-Sep-06 14:08 
GeneralRe: exception handeling Pin
Christian Graus24-Sep-06 15:09
protectorChristian Graus24-Sep-06 15:09 
GeneralRe: exception handeling Pin
Bram van Kampen24-Sep-06 15:16
Bram van Kampen24-Sep-06 15:16 
GeneralRe: exception handeling Pin
Christian Graus24-Sep-06 15:18
protectorChristian Graus24-Sep-06 15:18 
GeneralRe: exception handeling Pin
Bram van Kampen24-Sep-06 16:15
Bram van Kampen24-Sep-06 16:15 
GeneralRe: exception handeling Pin
Christian Graus24-Sep-06 16:31
protectorChristian Graus24-Sep-06 16:31 

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.