Home » U++ Library support » RichText,QTF,RTF... » Loading Image into qtf  
	
		
		
			| Re: Loading Image into qtf [message #11218 is a reply to message #11212] | 
			Mon, 27 August 2007 23:38    | 
		 
		
			
				
				
				  | 
					
						  
						forlano
						 Messages: 1215 Registered: March 2006  Location: Italy
						
					 | 
					Senior Contributor  | 
					 | 
		 
		 
	 | 
 
	
		Here is a little variation of the previous code. 
Now the qtf, that include the picture, needs to be saved on a file and then later opened with UWord. 
 
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
GUI_APP_MAIN
{     FileOut save("badge.qtf");
  
      save << "[ $$0,0#00000000000000000000000000000000:Default]\n[{_}%EN-US [s0; &]\n";
   
      DrawingDraw dw(500, 500);
      Image img = StreamRaster::LoadFileAny("C:\\MyApps\\qtfimage\\ita.png");        
      dw.DrawImage(0, 0, 500, 500, img);	
      QtfRichObject pict(CreateDrawingObject(dw.GetResult(), Size(500, 500), Size(500, 500)));
   
      save << "[ {{7008:2992>1440;h1; [s0;=* &]\n";
      save << "[s0;=*+150 " << "Big Jim" << " &]\n";
      save << "[s0;= USA &] [s0;= GM 2750 &]\n";
      save << "[s0;= ] :: [s0;= " << pict.ToString() << " &][s0; ]}}&][s0; &]\n";      
  
      save.Close();
}
 
 
Unfortunately it doesn't work. The code 
<< pict.ToString() << 
is wrong and I do not know how to save "pict" in some useful string format inside the document. Is it possible?... and how? 
Thanks. 
 
Luigi
		
		
		
 |  
	| 
		
	 | 
 
 
 |  
  
 
	
	  | 
	 | 
	
		Loading Image into qtf
		By:  guido on Fri, 08 June 2007 12:18  
	 | 
 
	  | 
	 | 
	
		Re: Loading Image into qtf
		By:  mirek on Fri, 08 June 2007 15:58  
	 | 
 
	  | 
	 | 
	
		Re: Loading Image into qtf
		By:  guido on Sat, 09 June 2007 14:18  
	 | 
 
	  | 
	 | 
	
		Re: Loading Image into qtf
		By:  mirek on Sat, 09 June 2007 18:54  
	 | 
 
	  | 
	 | 
	
		Re: Loading Image into qtf
		By:  forlano on Mon, 27 August 2007 19:32  
	 | 
 
	  | 
	 | 
	
		Re: Loading Image into qtf
		By:  forlano on Mon, 27 August 2007 19:57  
	 | 
 
	  | 
	 | 
	
		Re: Loading Image into qtf
		By:  forlano on Mon, 27 August 2007 23:38  
	 | 
 
	  | 
	 | 
	
		Re: Loading Image into qtf
		By:  mirek on Tue, 28 August 2007 13:10  
	 | 
 
	  | 
	 | 
	
		Re: Loading Image into qtf
		By:  forlano on Wed, 29 August 2007 00:23  
	 | 
 
	  | 
	 | 
	
		Re: Loading Image into qtf
		By:  mirek on Wed, 29 August 2007 11:26  
	 | 
 
	  | 
	 | 
	
		Re: Loading Image into qtf
		By:  forlano on Wed, 29 August 2007 12:21  
	 | 
 
	  | 
	 | 
	
		Re: Loading Image into qtf
		By:  dmcgeoch on Tue, 28 August 2007 12:58  
	 | 
 
	  | 
	 | 
	
		Re: Loading Image into qtf
		By:  guido on Tue, 28 August 2007 16:31  
	 | 
  
Goto Forum:
 
 Current Time: Tue Nov 04 14:32:15 CET 2025 
 Total time taken to generate the page: 0.06035 seconds 
 |