CRichEditCtrl
C / C++ / MFC
4
Posts
3
Posters
0
Views
1
Watching
-
Hi, Can anyone help with adding file contents to Rich Edit Box?? I have a text file i want to add the contents to rich Edit box,how to do that?
-
Create control variable of type "CRichEditCtrl" you can set text using SetWindowText API. Make sure that AfxInitRichEdit(); called in your InitInstance function of the APP class. SaRath
-
Hi Sarath, Thanks for the reply. I have created m_FCONT of CRichEditCtrl, for reading the contents is this function enough ?? char ch; FILE *fp; fp=fopen(str,"r"); ch=getc(fp); while(!feof(fp)) { ch=getc(fp); }
vinaycool wrote:
ch=getc(fp);
Reading one character at a time is not very efficient. I suggest using
CRichEditCtrl::StreamIn()
.
"The largest fire starts but with the smallest spark." - David Crow