!! Putting text file contents into a CEdit !!
Hi everyone,
I'd like to put a text file into my application as a resource and then print the contents of it into a CEdit control in my about box. lots of apps do this (Winamp, for example) but I'm not sure how. Can anyone shed some light on The Right Way?
Thanks as always,
Chris
My way (right way, who knows?)
Re: !! Putting text file contents into a CEdit !!
if you use MFC a simple syntaxe is GetDlgItemText or SetDlgItemText.
use GetGlgItemText(HWND hwnd,LPSTR lpTitre, int nMax) to read a value;
ie:
char buf[10];
memset(&buf,0,sizeof(buf));
sprintf(buf,"coucou");
GetDlgItemText(IDC_EDIT1, buf,sizeof(buf));
use the same syntax with SetDlgItemText to put a value in the CEDIT.
best regards.