Problems displaying contents of file

Hi!

I’m trying to open a file, read and display its contents. It is a word document. When the start button is pressed by the user, the contents in the file “document.datâ€

I believe you want to do:

PtSetResource(ABW_base_text,Pt_ARG_TEXT_STRING,pBuff,strlen(pBuff));

I cannot check that right now, but I think that’s correct.

[quote=“Calspar”]

   iBytesRead = fread (pBuff, sizeof(“document.datâ€

maybe you should change code like this:
while(!feof(fp))
{ fgets(pBuff,sizeof(pBuff),fp);}
PtSetResource(ABW_base_text,Pt_ARG_TEXT_STRING,pBuff,0);
fclose(fp);