Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » StreamRaster::LoadAnyFile -- not exist in distribution?
Re: StreamRaster::LoadAnyFile -- not exist in distribution? [message #5639 is a reply to message #5635] Fri, 06 October 2006 20:33 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13976
Registered: November 2005
Ultimate Member
temer wrote on Fri, 06 October 2006 12:17

OK, I've downloaded dev version and it's there.

Could you, please, help me with the following?

I want to insert a smiley (.gif file from disk) to rich text view. How do I do it? I'm stucked.

I can make QtfRichObject from vector Drawing with usage of CreateDrawingObject(), but I want to use raster smileys, not vector one.
And I can't see how to make a QtfRichObject from an Image.



So, I have

Image img = StreamRaster::LoadFileAny("c:\\385.gif");

and I want to add its contents to a RichTextView1.



And the last, is it possible to use animated images in RichTextView? Probably, not Sad.

Thank you in advance.



#include <CtrlLib/CtrlLib.h>

RichObject CreateImageObject(const Image& img)
{
	return RichObject("image", StoreImageAsString(img));
}

GUI_APP_MAIN
{
	QtfRichObject pict(CreateImageObject(StreamRaster::LoadFileAny("d:/jachym.bmp")));
	String qtf;
	qtf << "[A6 This is some drawing in QTF: " << pict << "&";
	qtf << "[C3*@B And now in the table: {{1:1 " << pict << ":: Another cell " << pict << "}}";
	PromptOK(qtf);
}


Anyway, as this is quite common request, I have added CreateImageObject to RichText package....
 
Read Message BugQuestion.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: image of cursor
Next Topic: saving a paletted PNG
Goto Forum:
  


Current Time: Thu May 09 04:14:09 CEST 2024

Total time taken to generate the page: 0.02285 seconds