|
-
May 31st, 2012, 01:32 PM
#4
Re: Why wont thsi mfc code work?
 Originally Posted by printz0r
This makes sense. So how would I write strings to the document? Or highlight certain words in the document and display it to the active view?
Code:
FILE *f;
CMyDoc *pDoc=(CMyDoc *)GetActiveDocument();
f=fopen(pDoc,"wb");
char buffer[] = { 'x' , 'y' , 'z' };
fwrite (buffer , 1 , sizeof(buffer) , f);
fclose (f);
pDoc->UpdateAllViews(NULL,0,0);
Would the above code work?
That may work but makes no sense as long as you are using MFC.
Last edited by ovidiucucu; May 31st, 2012 at 01:35 PM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|