02-27-2007, 03:06 PM
You can use functions RichEditLoad and RichEditSave. Also, rich text files can be automatically loaded into rich edit controls in custom dialogs.
_________________
I found these functions in my archive but don't remember whether they are complete and worked.
Function RtfOpen
Function RtfOpenProc
Function RtfSave
Function RtfSaveProc
_________________
I found these functions in my archive but don't remember whether they are complete and worked.
Function RtfOpen
;/
function# hre $filename
EDITSTREAM es
es.pfnCallback=&RtfOpenProc
es.dwCookie=CreateFile(filename GENERIC_READ 0 0 OPEN_EXISTING FILE_ATTRIBUTE_NORMAL 0)
if(es.dwCookie=-1) ret
SendMessage(hre EM_STREAMIN SF_RTF &es)
CloseHandle(es.dwCookie)
ret !es.dwErrorFunction RtfOpenProc
Function RtfSave
;/
function# hre $filename
EDITSTREAM es
es.pfnCallback=&RtfSaveProc
es.dwCookie=CreateFile(filename GENERIC_WRITE 0 0 CREATE_ALWAYS FILE_ATTRIBUTE_NORMAL 0)
if(es.dwCookie=-1) ret
SendMessage(hre EM_STREAMOUT SF_RTF &es)
CloseHandle(es.dwCookie)
ret !es.dwErrorFunction RtfSaveProc
