Click here to Skip to main content
15,913,773 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Creat a MDI child! Pin
dabs11-Apr-06 14:12
dabs11-Apr-06 14:12 
QuestionHow to track the mouse motion? Pin
Ming Luo11-Apr-06 5:04
Ming Luo11-Apr-06 5:04 
QuestionVideo For Windows capSetCallbackOnFrame Question Pin
YaronNir11-Apr-06 4:55
YaronNir11-Apr-06 4:55 
AnswerRe: Video For Windows capSetCallbackOnFrame Question Pin
9ine11-Apr-06 5:46
9ine11-Apr-06 5:46 
GeneralRe: Video For Windows capSetCallbackOnFrame Question Pin
YaronNir15-Apr-06 20:55
YaronNir15-Apr-06 20:55 
QuestionProblem with DT_WORDBREAK Pin
QuickDeveloper11-Apr-06 4:33
QuickDeveloper11-Apr-06 4:33 
AnswerRe: Problem with DT_WORDBREAK Pin
-Dy11-Apr-06 5:35
-Dy11-Apr-06 5:35 
QuestionRead in, write out RTF Pin
DanYELL11-Apr-06 4:17
DanYELL11-Apr-06 4:17 
I can read in a notepad file in entirety, store it in a CString,
and then write it out. I cant do the same for a file in rich text
format. For some reason, I dont get all of the file and when I
write it out and then launch it, it shifted around. Any idea on
how to read in an entire RTF file to a CString and then write it
out?

I put together this code:

CString str; char c;

ifstream In("c:\file.rtf");
while (In)
{
In >> c;
if (In) str += c;
}

In.close();

ofstream Out("c:\\file1.rtf");

int len = str.GetLength();

for (int i=0; i
AnswerRe: Read in, write out RTF Pin
David Crow11-Apr-06 5:09
David Crow11-Apr-06 5:09 
AnswerRe: Read in, write out RTF Pin
Trollslayer11-Apr-06 5:21
mentorTrollslayer11-Apr-06 5:21 
GeneralRe: Read in, write out RTF Pin
DanYELL11-Apr-06 12:59
DanYELL11-Apr-06 12:59 
GeneralRe: Read in, write out RTF Pin
DanYELL11-Apr-06 13:37
DanYELL11-Apr-06 13:37 
GeneralRe: Read in, write out RTF Pin
dabs11-Apr-06 14:15
dabs11-Apr-06 14:15 
GeneralRe: Read in, write out RTF Pin
Trollslayer11-Apr-06 22:51
mentorTrollslayer11-Apr-06 22:51 
QuestionIdea about => fun(CString str, ...) Pin
Andy Rama11-Apr-06 3:43
Andy Rama11-Apr-06 3:43 
AnswerRe: Idea about => fun(CString str, ...) Pin
toxcct11-Apr-06 3:49
toxcct11-Apr-06 3:49 
AnswerRe: Idea about => fun(CString str, ...) Pin
David Crow11-Apr-06 3:52
David Crow11-Apr-06 3:52 
GeneralRe: Idea about => fun(CString str, ...) Pin
Andy Rama11-Apr-06 22:31
Andy Rama11-Apr-06 22:31 
QuestionHow to Impersonate a Remote Machine. Pin
kiran janaswamy11-Apr-06 3:39
kiran janaswamy11-Apr-06 3:39 
QuestionRe: How to Impersonate a Remote Machine. Pin
David Crow11-Apr-06 3:54
David Crow11-Apr-06 3:54 
QuestionCEdit -> show messages in all languages. Pin
Suyash11-Apr-06 3:30
Suyash11-Apr-06 3:30 
AnswerRe: CEdit -> show messages in all languages. Pin
jayart11-Apr-06 6:06
jayart11-Apr-06 6:06 
GeneralRe: CEdit -> show messages in all languages. Pin
Suyash12-Apr-06 1:13
Suyash12-Apr-06 1:13 
Questiondisable/grey out date time picker Pin
viperlogic11-Apr-06 3:23
viperlogic11-Apr-06 3:23 
AnswerRe: disable/grey out date time picker Pin
-Dy11-Apr-06 3:38
-Dy11-Apr-06 3:38 

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.