55 lines
		
	
	
		
			903 B
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			55 lines
		
	
	
		
			903 B
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
#include <printapp.h>
 | 
						|
#include <iostream.h>
 | 
						|
#include <lffiles.h>
 | 
						|
#include <stdio.h>
 | 
						|
 | 
						|
class MyApp : public TPrintapp
 | 
						|
{
 | 
						|
	int counter; 
 | 
						|
public:
 | 
						|
  virtual void preprocess_page();
 | 
						|
  virtual bool create();
 | 
						|
  MyApp() : TPrintapp()
 | 
						|
  { counter = 0; }
 | 
						|
};
 | 
						|
 | 
						|
void MyApp::preprocess_page()
 | 
						|
{
 | 
						|
   reset_row(1);
 | 
						|
   set_row(1,"%d: Ragsoc: @10S", ++counter, FLD(LF_ANAG,"RAGSOC")); 
 | 
						|
}
 | 
						|
 | 
						|
bool MyApp::create()
 | 
						|
{
 | 
						|
   TPrintapp::create();
 | 
						|
   disable_sorting_menu();
 | 
						|
   disable_selection_menu();
 | 
						|
   return TRUE;
 | 
						|
}
 | 
						|
 | 
						|
main(int argc, char* argv[])
 | 
						|
{
 | 
						|
   MyApp app;
 | 
						|
   int dummy;
 | 
						|
 | 
						|
   cout << "process is: " << getpid();
 | 
						|
   fscanf(stdin,"%d",&dummy);
 | 
						|
 | 
						|
   TRelation tr_giu(LF_ANAG);
 | 
						|
   TCursor ttr(&tr_giu);
 | 
						|
 | 
						|
   app.cursor(&ttr);
 | 
						|
   app.set_config_file("pr2.stp");
 | 
						|
   app.set_row(2,"-------- riga statica con codanagr: @pn --------",
 | 
						|
		FLD(LF_ANAG,"CODANAGR","@@@@@@@@@"));
 | 
						|
   app.run(argc, argv, "Trial Print Application");	
 | 
						|
}
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 |