U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » RichText,QTF,RTF... » Loading Image into qtf
Re: Loading Image into qtf [message #11231 is a reply to message #11218] Tue, 28 August 2007 13:10 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
Sorry for the confusion there...

The problem is caused by the fact that for performance reasons, QtfRichObject creates only a temporary reference to the real RichObject. You need to call ParseQTF while both QtfRichObject and RichObject exist, otherwise you are in trouble... (a dangling pointer).

In your case, if you insist on immediate Save to disk of resulting .qtf, you can just use AsQTF(ParseQTF(text))....

Anyway, Drawing RichObjects do not have persistent storage representation, so I would also use

RichObject CreateImageObject(const Image& img, int cx = 0, int cy = 0);

instead here.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Rendering qtf into a window: horrible flicker
Next Topic: Failed to set String format in report from SQLite3
Goto Forum:
  


Current Time: Sat Sep 12 20:25:18 GMT+2 2026

Total time taken to generate the page: 0.01027 seconds