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 » RichText,QTF,RTF... » how can i get the image in the RichText?
Re: how can i get the image in the RichText? [message #54477 is a reply to message #54475] Wed, 29 July 2020 11:01 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14258
Registered: November 2005
Ultimate Member
Vector<Image> ExtractImages(const RichText& txt)
{
	struct Iter : RichText::Iterator {
		Vector<Image> m;
		virtual bool operator()(int, const RichPara& para) {
			for(int i = 0; i < para.GetCount(); i++) {
				const RichPara::Part& p = para[i];
				if(p.object)
					m.Add(p.object.ToImage(p.object.GetPixelSize()));
			}
			return false;
		}
	} iter;

	txt.Iterate(iter);
	
	return pick(iter.m);
}


(Now added as reference example).
 
Read Message icon3.gif
Read Message
Read Message
Read Message
Read Message
Previous Topic: how to solve WhenEnter event to RichEdit
Next Topic: Documentation / more info
Goto Forum:
  


Current Time: Wed May 14 17:39:22 CEST 2025

Total time taken to generate the page: 0.02775 seconds