save, load, insert custom controls to/from stream
Posted: Tue Jan 24, 2006 9:35 am
Hi Sergey,
can you please help with this:
Aim:
To insert HTML (which contains custom control tags) to caret position/curr. selection.
Problem:
As RvHtmlImport only allows to LoadHtml (replace all or append) but not insert, I tried to use SaveRVF[RTF]ToStream, LoadRVF[RTF]FromStream and InsertRVF[RTF]FromStreamEd.
Saving and loading RVF or RTF to and from streams runs into problems when the RichView contains custom controls (our own subclasses of TGraphicControl).
e.g.
CRVFData -> GetParaBounds throws index out of bounds;
RVFMisc -> RVFLoadControl[Binary] throws "... exception class EClassNotFound with message 'Class [our custom control] not found' ..."
Question:
What is the best way to do an insert of HTML that contains custom-control tags? (I already modified the RvHtmlImport to parse for and create custom controls, so the LoadHtml works fine)
Alternatively, what is the best way to get saving, loading and inserting of RVF to and from streams - including custom controls - working?
many thanks,
-- Lutz
can you please help with this:
Aim:
To insert HTML (which contains custom control tags) to caret position/curr. selection.
Problem:
As RvHtmlImport only allows to LoadHtml (replace all or append) but not insert, I tried to use SaveRVF[RTF]ToStream, LoadRVF[RTF]FromStream and InsertRVF[RTF]FromStreamEd.
Saving and loading RVF or RTF to and from streams runs into problems when the RichView contains custom controls (our own subclasses of TGraphicControl).
e.g.
CRVFData -> GetParaBounds throws index out of bounds;
RVFMisc -> RVFLoadControl[Binary] throws "... exception class EClassNotFound with message 'Class [our custom control] not found' ..."
Question:
What is the best way to do an insert of HTML that contains custom-control tags? (I already modified the RvHtmlImport to parse for and create custom controls, so the LoadHtml works fine)
Alternatively, what is the best way to get saving, loading and inserting of RVF to and from streams - including custom controls - working?
many thanks,
-- Lutz