Jump to content

PMPrinterDC: Difference between revisions

From EDM2
No edit summary
Ak120 (talk | contribs)
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Description==
==Description==
Printing is very easy with these supplied classes: a sample printout can be produced with as little code as:
Printing is very easy with these supplied classes: a sample printout can be produced with as little code as:
<PRE>
<PRE>
PMPrinterDC printer(hab); // create an instance of a PMPrinterDC
PMPrinterDC printer(hab); // create an instance of a PMPrinterDC
printer.open();             // open the DC
printer.open();           // open the DC
printer.startDoc("Test Document");
printer.startDoc("Test Document");
   
   
PMPresSpace *ptr=new
PMPresSpace *ptr=new
PMPresSpace(&printer, 1000, 1000,
PMPresSpace(&printer, 1000, 1000,
PU_ARBITRARY|PU_LOENGLISH|GPIF_DEFAULT|GPIT_NORMAL|GPIA_ASSOC, hab);
PU_ARBITRARY|PU_LOENGLISH|GPIF_DEFAULT|GPIT_NORMAL|GPIA_ASSOC, hab);
   
   
//    [draw on ptr]
//    [draw on ptr]
   
   
delete ptr;
delete ptr;
printer.endDoc("Test Document");
printer.endDoc("Test Document");
</PRE>
</PRE>


[[Category:The OS/2 API Project]]
[[Category:PM++]]

Latest revision as of 22:17, 31 December 2017

Description

Printing is very easy with these supplied classes: a sample printout can be produced with as little code as:

 PMPrinterDC printer(hab); // create an instance of a PMPrinterDC
 printer.open();           // open the DC
 printer.startDoc("Test Document");
 
 PMPresSpace *ptr=new
 PMPresSpace(&printer, 1000, 1000,
	PU_ARBITRARY|PU_LOENGLISH|GPIF_DEFAULT|GPIT_NORMAL|GPIA_ASSOC, hab);
 
	//    [draw on ptr]
 
 delete ptr;
 printer.endDoc("Test Document");