Click here to Skip to main content
16,007,932 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Where can i find SDK? Pin
Daniel Visan23-Oct-01 1:08
Daniel Visan23-Oct-01 1:08 
AnswerRe: Where can i find SDK? Pin
Steen Krogsgaard23-Oct-01 4:04
Steen Krogsgaard23-Oct-01 4:04 
GeneralRe: Where can i find SDK? Pin
Daniel Visan23-Oct-01 4:13
Daniel Visan23-Oct-01 4:13 
GeneralRe: Where can i find SDK? Pin
Steen Krogsgaard23-Oct-01 4:17
Steen Krogsgaard23-Oct-01 4:17 
GeneralSaving CString to text file Pin
23-Oct-01 0:09
suss23-Oct-01 0:09 
GeneralRe: Saving CString to text file Pin
Christian Graus23-Oct-01 0:40
protectorChristian Graus23-Oct-01 0:40 
GeneralRe: Saving CString to text file Pin
Alvaro Mendez23-Oct-01 8:55
Alvaro Mendez23-Oct-01 8:55 
GeneralRe: Saving CString to text file Pin
23-Oct-01 10:06
suss23-Oct-01 10:06 
Thanks, but I'm afraid that made no difference. I'm using this code:

void CTestDlg::WriteFile(CString strFile, CString strText)
{
	CStdioFile file;
	if (!file.Open(strFile, CFile::modeCreate | CFile::modeWrite | CFile::typeText))
	{
//		AfxMessageBox("Error - Couldn't save file.", MB_ICONSTOP | MB_SYSTEMMODAL);
		return;
	}

	file.Write(strText.GetBuffer(strText.GetLength()), strText.GetLength());

	strText.ReleaseBuffer();

	file.Close();
}


>
<ë é

Happens with any string, on three different computers, Win98 and Win2k, although the last 7 (\n and \r) characters (the garbage) are always random.

Thanks.
GeneralRe: Saving CString to text file Pin
Andrew Peace23-Oct-01 13:10
Andrew Peace23-Oct-01 13:10 
GeneralRe: Saving CString to text file Pin
23-Oct-01 5:12
suss23-Oct-01 5:12 
QuestionHow to save a binary resource file to disk Pin
Xenion23-Oct-01 0:06
Xenion23-Oct-01 0:06 
AnswerRe: How to save a binary resource file to disk Pin
Christian Graus23-Oct-01 0:45
protectorChristian Graus23-Oct-01 0:45 
Generaltextcolor Pin
22-Oct-01 23:46
suss22-Oct-01 23:46 
GeneralRe: textcolor Pin
Christian Graus22-Oct-01 23:51
protectorChristian Graus22-Oct-01 23:51 
GeneralRe: textcolor Pin
24-Oct-01 3:25
suss24-Oct-01 3:25 
QuestionXP will change my user interface? Pin
Joan M22-Oct-01 23:36
professionalJoan M22-Oct-01 23:36 
AnswerRe: XP will change my user interface? Pin
Christian Graus22-Oct-01 23:48
protectorChristian Graus22-Oct-01 23:48 
AnswerRe: XP will change my user interface? Pin
Ashman22-Oct-01 23:48
Ashman22-Oct-01 23:48 
AnswerRe: XP will change my user interface? Pin
Tomasz Sowinski23-Oct-01 2:35
Tomasz Sowinski23-Oct-01 2:35 
GeneralSystem tray icons not showing in XP or 2k Pin
Ashman22-Oct-01 23:35
Ashman22-Oct-01 23:35 
GeneralWhen press Enter Key Pin
22-Oct-01 22:29
suss22-Oct-01 22:29 
GeneralRe: When press Enter Key Pin
Jonas Larsson22-Oct-01 22:33
Jonas Larsson22-Oct-01 22:33 
GeneralRe: When press Enter Key Pin
Cris23-Oct-01 2:34
Cris23-Oct-01 2:34 
GeneralRe: When press Enter Key Pin
Michael Dunn22-Oct-01 22:35
sitebuilderMichael Dunn22-Oct-01 22:35 
GeneralDestroying COleSafeArray ... Pin
Hadi Rezaee22-Oct-01 18:41
Hadi Rezaee22-Oct-01 18:41 

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.