═══ 1. PrtGraph C Library ═══ The PrtGraph C Library (prtgrafc.dll) gives you high level, application oriented access to complex graphic printing functionality. With this library you will be able to create professional style reports and outputs for your programs without having to resort to the lengthy and tedious process of programming the OS/2 Gpi interface. You can create reports and documents with text in up to 25 different font faces that can be justified, right or left aligned or centred. You can include bitmap images and boxes and print tables with or without running headers. The PrtGraph C Library allows you to define page headers and footers and gives you access to a list of the printers connected to your work-station and their Job Properties dialogs as well as to the font dialog for the chosen printer. ═══ 1.1. Whats new in version 2.1 ═══ The PrtGraph C Library has been aligned with the PrtGraph REXX Library, the VRPrinter Object for VX-REXX and the PrtGraph Class Library. In version 2.0 we introduced properties which are all accessed through the same functions. The memory usage of the library has been reduced and the code efficiency improved. In this version the following functions have been added:  PrtGMoveX  PrtGMoveY  PrtGPrintWinImage PrtGNewPage will now prepare the job to start a new page from within a table when the next PrtGEndRow call is made. ═══ 1.2. Shareware Software ═══ DEFINITION OF SHAREWARE SOFTWARE Shareware Software distribution gives users a chance to try software before buying it. If you try a Shareware software program and continue using it, you are expected to register. Individual programs differ on details -- some request registration while others require it, some specify a maximum trial period. With registration, you get anything from the simple right to continue using the software to an updated program with printed manual. Copyright laws apply to both Shareware and commercial software, and the copyright holder retains all rights, with a few specific exceptions as stated below. Shareware software authors are accomplished programmers, just like commercial authors, and the programs are of comparable quality. (In both cases, there are good programs and bad ones!) The main difference is in the method of distribution. The author specifically grants the right to copy and distribute the software, either to all and sundry or to a specific group. For example, some authors require written permission before a commercial disk vendor may copy their Shareware software. Shareware software is a distribution method, not a type of software. You should find software that suits your needs and pocketbook, whether it's commercial or Shareware software. The Shareware software system makes fitting your needs easier, because you can try before you buy. And because the overhead is low, prices are low also. Shareware software has the ultimate money-back guarantee -- if you don't use the product, you don't pay for it. When you register the PrtGraph C Library you will be sent a registered version of the DLL by e-mail. This version has the "nag" popup removed and you have the right to freely distribute software that includes the DLL. If you are satisfied with the PrtGraph C Library we ask you to freely distribute the shareware version to your freinds and colleagues. If you have any suggestions for enhancements or find any bugs in the software please contact us at one of our Contact Addresses ═══ 1.3. Registering your license ═══ Printer is a "Shareware software program" and is provided at no charge to the user for evaluation. Feel free to share it with your friends, but please do not give it away altered or as part of another system. The essence of "user-supported" software is to provide personal computer users with quality software without high prices, and yet to provide incentive for programmers to continue to develop new products. If you find this program useful and find that you are using Printer and continue to use Printer after a reasonable trial period of 30 days, you must make a registration payment of $45.00 to ADD Consulting (CH). If you have already registered either PrtGraph for REXX or VRPrinter you can register for $20.00. You can register through the CompuServe Shareware Registration facility: GO SWREG registration Number 6201 for new registrations GO SWREG registration Number 6202 for registered users of another ADD Consulting printing library The registration fee will license one copy for use on any one computer at any one time. You must treat this software just like a book. An example is that this software may be used by any number of people and may be freely moved from one computer location to another, so long as there is no possibility of it being used at one location while it's being used at another. Just as a book cannot be read by two different persons at the same time. Payment of the registration fee gives you the right to distribute programs that include the object and the DLL without paying any other "run-time" licenses. Site-License arrangements may be made by contacting ADD Consulting (CH). ═══ 1.4. Distributing the PrtGraph C Library ═══ Anyone distributing the PrtGraph C Library for any kind of remuneration must first contact ADD Consulting (CH) at our address below for authorization. This authorization will be automatically granted to distributors recognized by the (ASP) as adhering to its guidelines for shareware distributors, and such distributors may begin offering Printer immediately, however ADD Consulting (CH) should still be advised so that the distributor can be kept up-to-date with the latest version of Printer. Registered users are free to distribute programs that use the the PrtGraph C Library with no additional run-time fees. ═══ 1.5. Contact Address ═══ You can contact ADD Consulting at the addresses below: ADD Consulting (CH) Mr. Peter Kanis Via Suro 9 CH-7403 RhДzБns Switzerland Tel: +41 (0)81 630 2011 Fax: +41 (0)81 630 2015 CompuServe: 100275,350 (Peter Kanis) INTERNET: kanis@ibm.net ADD Consulting (RUS) Mr. Michael V. Schelkin 18-29 Molodezhnaya Street Jukovsky 140160 Moscow Region Russia Tel: +7 095 556 8533 Internet: michael@schelkin.msk.ru ═══ 1.6. Rights And Limitations ═══ ADD Consulting makes no warranties as to the information in this guide. Additionally, ADD Consulting is not responsible or liable for any loss or damage of any kind resulting from use of this product. The Software is protected by international copyright laws. All rights reserved. No part of the computer program, documentation or related files may be reproduced photocopied, stored on a retrieval system, or transmitted except as provided by copyright law or by express permission of the copyright owner. DISCLAIMER - AGREEMENT Users of the PrtGraph C Library shall accept this disclaimer of warranty: ADD CONSULTING SUPPLIES THIS PRODUCT AS IS WITHOUT WARANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARANTIES OF MERCANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. ADD CONSULTING ASSUMES NO LIABILITY FOR DAMAGES, DIRECT OR CONSEQUENTIAL, WHICH MAY RESULT FROM THE USE OF THE PRODUCT. Some jurisdictions do not allow the exclusion or limitations for consequential or incidental damages, so the above may not apply to you. ═══ 2. The DEMO program ═══ Included in this package is a demonstration program written in C and its source code. The demo shows you many of the possibilities offered by the DLL, but the limits are set by your imagination. Figure: Demo Program. ═══ 3. Setting up a print job ═══ Setting up a print job requires several steps:  Link the library with your executable or DLL using PRTGRAFC.LIB  Intialise the printing environment with PrtGInit  Choose a printer with either PrtGPrinterDlg or PrtGPrinterList and PrtGSetPrinter  If necessary set the job properties with PrtGJobProps  Set the page margins with PrtGSetMargins  Set up any header text with PrtGDefineHeader, PrtGAddHeaderLine and PrtGSetHeader  Set up any footer with PrtGDefineFooter and PrtGSetFooter  Open the print job with PrtGOpenPrintJob  Print your texts, tables, bitmaps etc..  Close the print job with PrtGClosePrintJob Since headers and footers often contain constants like the date or the document title and variables like the page number, the texts defined for these can contain special formatting characters. NOTE All the input parameters that denote positions are by default in millimetres or 1/10 inch depending on the Measures property. You can convert from inches using the formula: mm = 254 * inch All the line widths are defined in TWIPS: 1 Point = 20 TWIPS 1 mm = 56.7 TWIPS (rounded to 57 for internal calculation) Warning: If you wish to print several documents concurrently (i.e. in parrallel threads) you must initialise and terminate the environment for each thead with PrtGInit and PrtGTerm. ═══ 4. Formatting Characters ═══ To help define header and footer texts with PrtGDefineHeader and PrtGDefineFooter the following special formatting flags are defined: ┌────────┬────────────────────────────────────────────────────────┐ │$ │If followed by one of the other characters in this table│ │ │it indicates a formatting character follows, otherwise │ │ │it is taken as a literal '$' │ ├────────┼────────────────────────────────────────────────────────┤ │l │Left align the following text │ ├────────┼────────────────────────────────────────────────────────┤ │r │Right align the following text │ ├────────┼────────────────────────────────────────────────────────┤ │c │Centre the following text │ ├────────┼────────────────────────────────────────────────────────┤ │@ │Insert the current date formatted acording to the system│ │ │settings. This is read every time a job is started; so │ │ │you can change the date format from job to job in the │ │ │same sesssion. │ ├────────┼────────────────────────────────────────────────────────┤ │# │insert the current page number (always arabic) │ ├────────┼────────────────────────────────────────────────────────┤ │▌ or | │Insert the title of the document (see PrtGOpenPrintJob) │ └────────┴────────────────────────────────────────────────────────┘ Example '$▌$rpage $#' would give: Document Title page 1 '$r@ page $#' would give (where date is defined as ISO with '/' separator): 1995/03/18 page 1 Warning: Formatting characters only apply to the page and table header and page footer texts. ═══ 5. Fill Styles ═══ Several of the PrtGraph C Library refer to a fill style. You can see the effect of a style for any printer by running the DEMO program and printing the box styles option. The you pass to any of these functions are translated into PATSYM_????? constants, and the output is, to a certain extent, device dependent. For an idea of what you will obtain see the pictures below (see also . ═══ 6. Returns ═══ Many of the PrtGraph C Library functions return a USHORT value. These will be one of the following: ┌───────────────────────┬────┬────────────────────────────────────────┐ │Constant │Val │Explanation │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRTGR_OK │0 │Operation completed successfully. │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRTGR_ERR_INV_HANDLE │1 │An invalid handle passed to a function. │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRTGR_ERR_NO_PRINTER │2 │No printer has been defined on the │ │ │ │work-station. │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRTGR_ERR_PARAMETER │3 │A parameter passed to the function was │ │ │ │out of range. │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRTGR_ERR_INV_BITMAP │4 │The bitmap read from a file was not a │ │ │ │valid bitmap. │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRTGR_ERR_INV_FILENAME │5 │The file opened to read a bitmap either │ │ │ │did not exist or an I/O error occured. │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRTGR_ERR_INV_FONT │6 │The font requested for a write operation│ │ │ │could not be loaded. This could be │ │ │ │because there are too many fonts │ │ │ │declared for the job or the face name is│ │ │ │invalid. │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRTGR_ERR_JOB_OPEN │7 │Failed to open the print job. Usually │ │ │ │caused by an invalid device context │ │ │ │being selected when using PrtGSetPrinter│ │ │ │. Using PrtGPrinterDlg to set the │ │ │ │printer context is always safer. │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRTGR_ERR_NOT_TABLE │8 │A call was made to a table related │ │ │ │function outside of a PrtGStartTable, │ │ │ │PrtGEndTable pair. │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRTGR_ERR_TABLE_HEADER │9 │An error occured trying to print a │ │ │ │running header for a table, check the │ │ │ │definition. │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRTGR_ERR_NO_JOB │10 │A printing function was called when no │ │ │ │job had been opened. │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRTGR_ERR_PRINTING │9 │A print setup function was called when a│ │ │ │job was running. │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRTGR_ERR_READONLY │12 │You tried setting a read only property. │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRTGR_ERR_INV_PROP │13 │An invalid property was requested │ │ │ │requested │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRTGR_ERR_INV_VALUE │14 │You tried setting a property to an │ │ │ │invalid value │ └───────────────────────┴────┴────────────────────────────────────────┘ ═══ 7. Constants ═══ Constants are described in the following sections:  Lines and Fill Styles  Print Styles for Files  Printer Properties ═══ 7.1. Lines and Fill Styles ═══ The following constants define Fill Styles and line thicknesses: ┌─────────────────┬──────────┬────────────────────────────────────────┐ │Constant │Value │Description │ ├─────────────────┼──────────┼────────────────────────────────────────┤ │FILL_NONE │(ULONG)0 │No fill for a box, header, footer or │ │ │ │table │ ├─────────────────┼──────────┼────────────────────────────────────────┤ │FILL_FULL │(ULONG)1 │full fill for a box, header, footer or │ │ │ │table │ ├─────────────────┼──────────┼────────────────────────────────────────┤ │FILL_90 │(ULONG)2 │90% tone fill for a box, header, footer │ │ │ │or table │ ├─────────────────┼──────────┼────────────────────────────────────────┤ │FILL_80 │(ULONG)3 │80% fill for a box, header, footer or │ │ │ │table │ ├─────────────────┼──────────┼────────────────────────────────────────┤ │FILL_75 │(ULONG)4 │75% fill for a box, header, footer or │ │ │ │table │ ├─────────────────┼──────────┼────────────────────────────────────────┤ │FILL_70 │(ULONG)5 │70% fill for a box, header, footer or │ │ │ │table │ ├─────────────────┼──────────┼────────────────────────────────────────┤ │FILL_60 │(ULONG)6 │60% fill for a box, header, footer or │ │ │ │table │ ├─────────────────┼──────────┼────────────────────────────────────────┤ │FILL_HALF │(ULONG)7 │Half tone fill for a box, header, footer│ │ │ │or table │ ├─────────────────┼──────────┼────────────────────────────────────────┤ │FILL_LIGHT │(ULONG)8 │Light tone fill for a box, header, │ │ │ │footer or table │ ├─────────────────┼──────────┼────────────────────────────────────────┤ │FILL_VERT │(ULONG)9 │Vertical line fill for a box, header, │ │ │ │footer or table │ ├─────────────────┼──────────┼────────────────────────────────────────┤ │FILL_HORIZ │(ULONG)10 │Horizontal line fill for a box, header, │ │ │ │footer or table │ ├─────────────────┼──────────┼────────────────────────────────────────┤ │FILL_DIAGR45 │(ULONG)11 │45° Diagonal left to right line fill for│ │ │ │a box, header, footer or table │ ├─────────────────┼──────────┼────────────────────────────────────────┤ │FILL_DIAGR33 │(ULONG)12 │33° Diagonal left to right line fill for│ │ │ │a box, header, footer or table │ ├─────────────────┼──────────┼────────────────────────────────────────┤ │FILL_DIAGL45 │(ULONG)13 │45° Diagonal right to left line fill for│ │ │ │a box, header, footer or table │ ├─────────────────┼──────────┼────────────────────────────────────────┤ │FILL_DIAGL33 │(ULONG)14 │33° Diagonal right to left line fill for│ │ │ │a box, header, footer or table │ ├─────────────────┼──────────┼────────────────────────────────────────┤ │LINE_NONE │(ULONG)0 │No line for a box, header, footer or │ │ │ │table │ ├─────────────────┼──────────┼────────────────────────────────────────┤ │LINE_THIN │(ULONG)14 │Thin line 0.25mm thick for a box, │ │ │ │header, footer or table │ ├─────────────────┼──────────┼────────────────────────────────────────┤ │LINE_MEDIUM │(ULONG)28 │Medium line 0.5mm thick for a box, │ │ │ │header, footer or table │ ├─────────────────┼──────────┼────────────────────────────────────────┤ │LINE_THICK │(ULONG)56 │Thick line 1mm thick for a box, header, │ │ │ │footer or table │ └─────────────────┴──────────┴────────────────────────────────────────┘ ═══ 7.2. Print Styles for Files ═══ The following constants define printing styles for printing files: ┌───────────────────────┬────┬────────────────────────────────────────┐ │Constant │Val │Description │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRT_CENTER │0 │Print the lines from the file centered │ │ │ │beween the margins │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRT_JUSTIFIED │1 │Print the lines from the file justified │ │ │ │between the margins │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRT_RIGHT │2 │Print the lines from the file right │ │ │ │aligned │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRT_LEFT │3 │Print the lines from the file left │ │ │ │aligned │ └───────────────────────┴────┴────────────────────────────────────────┘ ═══ 7.3. Printer Properties ═══ The following constants define measurement types: ┌─────────────────┬──────────┬────────────────────────────────────────┐ │Constant │Value │Description │ ├─────────────────┼──────────┼────────────────────────────────────────┤ │MSR_METRIC │"Metric" │Defines all measures to be in │ │ │ │millimetres │ ├─────────────────┼──────────┼────────────────────────────────────────┤ │MSR_INCH │"Inch" │Defines all measures to be in units of │ │ │ │1/10th inch │ └─────────────────┴──────────┴────────────────────────────────────────┘ The following constants are used to access the printer properties: ┌───────────────────────┬────┬────────────────────────────────────────┐ │Constant │Val │See property │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRT_LEFTMARGIN │0 │LeftMargin │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRT_RIGHTMARGIN │1 │RightMargin │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRT_TOPMARGIN │2 │TopMargin │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRT_BOTTOMMARGIN │3 │BottomMargin │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRT_PAGEWIDTH │4 │PageWidth │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRT_PAGEHEIGHT │5 │PageHeight │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRT_PRINTING │6 │Printing │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRT_CURRENTPRINTER │7 │CurrentPrinter │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRT_CURRENTDEVICE │8 │CurrentDevice │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRT_DEFAULTPRINTER │9 │DefaultPrinter │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRT_LINESPACE │10 │LineSpace │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRT_VERSION │11 │Version │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRT_PRINTCOLOR │12 │PrintColor │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRT_COLORENABLED │13 │ColorEnabled │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRT_MEASURES │14 │Measures │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRT_PAGENUM │15 │PageNum │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRT_JOBNAME │16 │JobName │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRT_MINLEFTMAR │17 │MinLeftMar │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRT_MINRIGHTMAR │18 │MinRightMar │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRT_MINTOPMAR │19 │MinTopMar │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRT_MINBOTTOMMAR │20 │MinBottomMar │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRT_FORMNAME │21 │FormName │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRT_FORMWIDTH │22 │FormWidth │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRT_FORMHEIGHT │23 │FormHeight │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRT_WORDBREAK │24 │WordBreak │ ├───────────────────────┼────┼────────────────────────────────────────┤ │PRT_SHOWPROGRESS │25 │ShowProgress │ └───────────────────────┴────┴────────────────────────────────────────┘ ═══ 8. Data Types ═══ The following sections describe the data types exported by the PrtGraph C Library.  HFOOTER  HGRPRT  HHEADER  HTABLE  PFNNP  PROP_TYPE ═══ 8.1. HFOOTER ═══ typedef LHANDLE HFOOTER; Handle to a footer definition. This definition is independent of HGRPRT and the object is only merged with the print job definition after a call to PrtGSetFooter. The Object can, therefore, be used in several print jobs in an application. The object is destroyed by calling PrtGDestroyFtrDef ═══ 8.2. HGRPRT ═══ typedef LHANDLE HGRPRT; Handle to the graphics printing environment. All printing operations require a variable of this type to have been previously initialised by a call to PrtGInit. ═══ 8.3. HHEADER ═══ typedef LHANDLE HHEADER; Handle to a page header definition. This definition is independent of HGRPRT and the object is only merged with the print job definition after a call to PrtGSetHeader. The Object can, therefore, be used in several print jobs in an application. The object is destroyed by calling PrtGDestroyHdrDef ═══ 8.4. HTABLE ═══ typedef LHANDLE HTABLE; Handle to a table definition. This definition is independent of HGRPRT and the object is only merged with the print job definition after a call to PrtGStartTable. The Object can, therefore, be used in several print jobs in an application. The object is destroyed by calling PrtGDestroyTblDef ═══ 8.5. PFNNP ═══ typedef BOOL (APIENTRY FNNP)(HGRPRT, USHORT, BOOL); typedef FNNP *PFNNP; Hook function for new page. A call will be made to this function every time a new page is created internally by the library and before the page is printed. The format of the function is: VOID MyNewPageFunc( HGRPRT hp, USHORT page_num, BOOL in_table); Parameters hp Handle to the printing environment returned by PrtGInit page_num The number of the page that is about to be printed in_table is set to true if a table is being printed that will continue over to the new page. Description This function is supplied so that you can modify page headers or column headers when a new page is printed. ═══ 8.6. PROP_TYPE ═══ typedef union { BOOL flag; ULONG numeric; PSZ string; } PROP_TYPE; This union type is used to set or get the value of a printer property. ═══ 9. Properties ═══ The following sections describe the properties of a printer in the PrtGraph C Library and which can be accessed using with the relevannt Printer Properties Constant:  BottomMargin  ColorEnabled  CurrentDevice  CurrentPrinter  DefaultPrinter  FormHeight  FormName  FormWidth  JobName  LeftMargin  LineSpace  Measures  MinBottomMar  MinLeftMar  MinRightMar  MinTopMar  PageHeight  PageNum  PageWidth  Printing  PrintColor  RightMargin  ShowProgress  TopMargin  Version  WordBreak ═══ 9.1. BottomMargin ═══ ═══ BottomMargin - List ═══ Data Type ULONG See Also  LeftMargin  RightMargin  TopMargin  PageHeight  PageWidth ═══ BottomMargin - Description ═══ ulong = PrtGGet( printer, PRT_BOTTOMMARGIN); The distance of the bottom margin from the lower edge of the page. The measure is in mm or 1/10 inch depending on the Measures property. Warning: This property is read only and cannot be set with a call to PrtGSet. ═══ 9.2. ColorEnabled ═══ ═══ ColorEnabled - List ═══ Data Type BOOL Possible Values 1 (TRUE) 0 (FALSE) See Also  PrintColor ═══ ColorEnabled - Description ═══ flag = PrtGGet( printer, PRT_COLORENABLED); Boolean property indicating whether color printing is enabled or not. ═══ 9.3. CurrentDevice ═══ ═══ CurrentDevice - List ═══ Data Type PSZ See Also  CurrentPrinter  PrtGPrinterDialog ═══ CurrentDevice - Description ═══ psz = PrtGGet( printer, PRT_CURRENTDEVICE); The name of the printer device selected for the printer object. This is the same as the Physical Name seen in printer settings notebook. Warning: This property is read only and cannot be set with a call to PrtGSet. ═══ 9.4. CurrentPrinter ═══ ═══ CurrentPrinter - list ═══ Data Type PSZ See Also  CurrentDevice  PrtGPrinterDialog ═══ CurrentPrinter - Description ═══ psz = PrtGGet( printer, PRT_CURRENTPRINTER); The name of the printer selected for the printer object. This is the same as the name seen on the desktop printer object. Warning: This property is read only and cannot be set with a call to PrtGSet. ═══ 9.5. DefaultPrinter ═══ ═══ DefaultPrinter - List ═══ Data Type PSZ See Also  CurrentDevice  CurrentPrinter  PrtGPrinterDialog ═══ DefaultPrinter - Description ═══ psz = PrtGGet( printer, PRT_DEFAULTPRINTER); The name of the default system printer. This is the same as the name seen on the desktop printer object. Warning: This property is read only and cannot be set with a call to PrtGSet. ═══ 9.6. FormHeight ═══ ═══ FormHeight - List ═══ Data Type ULONG See Also  FormName  FormWidth ═══ FormHeight - Description ═══ ulong = PrtGGet( printer, PRT_FORMHEIGHT); The height of the currently selected form for the current printer in mm or 1/10 inch depending on the Measures property. Warning: This property is read only and cannot be set with a call to PrtGSet. ═══ 9.7. FormName ═══ ═══ FormName - List ═══ Data Type PSZ See Also  FormHeight  FormWidth ═══ FormName - Description ═══ psz = PrtGGet( printer, PRT_FORMNAME); The name of the currently selected form for the current printer. Warning: This property is read only and cannot be set with a call to PrtGSet. ═══ 9.8. FormWidth ═══ ═══ FormWidth - List ═══ Data Type ULONG See Also  FormHeight  FormName ═══ FormWidth - Description ═══ ulong = PrtGGet( printer, PRT_FORMWIDTH); The width of the currently selected form for the current printer in mm or 1/10 inch depending on the Measures property. Warning: This property is read only and cannot be set with a call to PrtGSet. ═══ 9.9. JobName ═══ ═══ JobName - List ═══ Data Type PSZ ═══ JobName - Description ═══ psz = PrtGGet( printer, PRT_JOBNAME); The document name of the current print job. Warning: This property is read only and cannot be set with a call to PrtGSet. ═══ 9.10. LeftMargin ═══ ═══ LeftMargin - List ═══ Data Type ULONG See Also  BottomMargin  RightMargin  TopMargin  PageHeight  PageWidth ═══ LeftMargin - Description ═══ ulong = PrtGGet( printer, PRT_LEFTMARGIN); The distance of the left margin from the left edge of the page. The measure is in mm or 1/10 inch depending on the Measures property. Warning: This property is read only and cannot be set with a call to PrtGSet. ═══ 9.11. LineSpace ═══ ═══ LineSpace - List ═══ Data Type ULONG See Also  PrtGPrintCentered  PrtGPrintJustified  PrtGPrintLeft  PrtGPrintLine  PrtGPrintRight ═══ LineSpace - Description ═══ ulong = PrtGGet( printer, PRT_LINESPACE); Line spacing as a percentage of the font size. The default value is set to single space = 120%. All writes following this call will use this inter-line spacing. ═══ 9.12. Measures ═══ ═══ Measures - List ═══ Data Type PSZ Possible Values "Metric" (MSR_METRIC) "Inch" (MSR_INCH) See Also  PrtGSetFooter  PrtGSetHeader  PrtGSetHeaderLineFont  PrtGSetMargins ═══ Measures - Description ═══ psz = PrtGGet( printer, PRT_MEASURES); The units to use for distances on the printing page. These can be either mm (the default) or in 1/10 inch units. ═══ 9.13. MinBottomMar ═══ ═══ MinBottomMar - List ═══ Data Type ULONG See Also  MinLeftMar  MinRightMar  MinTopMar ═══ MinBottomMar - Description ═══ ulong = PrtGGet( printer, PRT_MINBOTTOMMAR); The minimum bottom margin allowed for the selected printer. The measure is in mm or 1/10 inch depending on the Measures property. Warning: This property is read only and cannot be set with a call to PrtGSet. ═══ 9.14. MinLeftMar ═══ ═══ MinLeftMar - List ═══ Data Type ULONG See Also  MinBottomMar  MinRightMar  MinTopMar ═══ MinLeftMar - Description ═══ ulong = PrtGGet( printer, PRT_MINLEFTMAR); The minimum left margin allowed for the selected printer. The measure is in mm or 1/10 inch depending on the Measures property. Warning: This property is read only and cannot be set with a call to PrtGSet. ═══ 9.15. MinRightMar ═══ ═══ MinRightMar - List ═══ Data Type ULONG See Also  MinBottomMar  MinLeftMar  MinTopMar ═══ MinRightMar - Description ═══ ulong = PrtGGet( printer, PRT_MINRIGHTMAR); The minimum right margin allowed for the selected printer. The measure is in mm or 1/10 inch depending on the Measures property. Warning: This property is read only and cannot be set with a call to PrtGSet. ═══ 9.16. MinTopMar ═══ ═══ MinTopMar - List ═══ Data Type ULONG See Also  MinBottomMar  MinLeftMar  MinRightMar ═══ MinTopMar - Description ═══ ulong = PrtGGet( printer, PRT_MINTOPMAR); The minimum top margin allowed for the selected printer. The measure is in mm or 1/10 inch depending on the Measures property. Warning: This property is read only and cannot be set with a call to PrtGSet. ═══ 9.17. PageHeight ═══ ═══ PageHeight - List ═══ Data Type ULONG See Also  BottomMargin  LeftMargin  RightMargin  TopMargin  PageWidth ═══ PageHeight - Decsription ═══ ulong = PrtGGet( printer, PRT_PAGEHEIGHT); The height of the printing area of the page (bottom to top margin) in mm or 1/10 inch depending on the Measures property. Warning: This property is read only and cannot be set with a call to PrtGSet. ═══ 9.18. PageNum ═══ ═══ PageNum - List ═══ Data Type ULONG See Also  JobName ═══ PageNum - Description ═══ ulong = PrtGGet( printer, PRT_PAGENUM); This property contains the number of the page that is currently being printed. Warning: This property is read only and cannot be set with a call to PrtGSet. ═══ 9.19. PageWidth ═══ ═══ PageWidth - List ═══ Data Type ULONG See Also  BottomMargin  LeftMargin  RightMargin  TopMargin  PageHeight ═══ PageWidth - Description ═══ ulong = PrtGGet( printer, PRT_PAGEWIDTH); The width of the printing area of the page (left to right margin) in mm or 1/10 inch depending on the Measures property. Warning: This property is read only and cannot be set with a call to PrtGSet. ═══ 9.20. Printing ═══ ═══ Printing - List ═══ Data Type BOOL Possible Values 1 (TRUE) 0 (FALSE) See Also  PrtGClosePrintJob  PrtGOpenPrintJob ═══ Printing - Description ═══ bool = PrtGGet( printer, PRT_PRINTING); This property is set to 1 when a print job is open on the printer object. Otherwise this property is set to 0. Warning: This property is read only and cannot be set with a call to PrtGSet. ═══ 9.21. PrintColor ═══ ═══ PrintColor - List ═══ Data Type LONG Possible Values See Description See Also  ColorEnabled ═══ PrintColor - Description ═══ long = PrtGGet( printer, PRT_PRINTCOLOR); This property is only relevant for colour printers. It contains the current colour being used for printing. This color can be any of the standard GPI color constants: CLR_WHITE CLR_BLACK CLR_BLUE CLR_RED CLR_PINK CLR_GREEN CLR_CYAN CLR_YELLOW CLR_DARKGRAY CLR_DARKBLUE CLR_DARKRED CLR_DARKPINK CLR_DARKGREEN CLR_DARKCYAN CLR_BROWN CLR_PALEGREY CLR_DEFAULT ═══ 9.22. RightMargin ═══ ═══ RightMargin - List ═══ Data Type ULONG See Also  BottomMargin  LeftMargin  TopMargin  PageHeight  PageWidth ═══ RightMargin - Description ═══ ulong = PrtGGet( printer, PRT_RIGHTMARGIN); The distance of the right margin from the right edge of the page. The measure is in mm or 1/10 inch depending on the Measures property. Warning: This property is read only and cannot be set with a call to PrtGSet. ═══ 9.23. ShowProgress ═══ ═══ ShowProgress - List ═══ Data Type BOOL Possible Values 1 (TRUE) 0 (FALSE) See Also  ═══ ShowProgress - Description ═══ bool = PrtGGet( printer, PRT_SHOWPROGRESS); This is boolean property that when set enables the progress dialog to pop up when a job is printing. Figure: Default Progress Dialog. ═══ 9.24. TopMargin ═══ ═══ TopMargin - List ═══ Data Type ULONG See Also  BottomMargin  LeftMargin  RightMargin  PageHeight  PageWidth ═══ TopMargin - Description ═══ ulong = PrtGGet( printer, PRT_TOPMARGIN); The distance of the top margin from the upper edge of the page. The measure is in mm or 1/10 inch depending on the Measures property. Warning: This property is read only and cannot be set with a call to PrtGSet. ═══ 9.25. Version ═══ ═══ Version - List ═══ Data Type PSZ Data Type Numeric ═══ Version - Description ═══ psz = PrtGGet( printer, PRT_VERSION); Version number of the object. Warning: This property is read only and cannot be set with a call to PrtGSet. ═══ 9.26. WordBreak ═══ ═══ WordBreak - List ═══ Data Type BOOL Possible Values 1 (TRUE) 0 (FALSE) ═══ WordBreak - Description ═══ bool = PrtGGet( printer, PRT_WORDBREAK); The WordBreak property allows you to control the way the Printer Object performs word wrapping on a block of text. By default this property is set to 1 (TRUE) so that the breaks occur between words. By setting this property off (0), line wrapping will occur with breaks between characters. ═══ 10. Functions ═══ The following sections describe the functions exported by PrtGraph C Library. In the following list, the names of the old functions are given where applicacable. These old function names are maintained for backward compatibility.  PrtGAbortPrintJob  PrtGAddColumn  PrtGAddHeaderLine  PrtGClosePrintJob  PrtGDefineFooter  PrtGDefineHeader  PrtGDefineTable  PrtGDefineFtrColors  PrtGDefineHdrColors  PrtGDefineTableColors  PrtGDestroyFtrDef  PrtGDestroyHdrDef  PrtGDestroyTblDef  PrtGEndRow  PrtGEndTable  PrtGFontDialog PrtGFontDlg  PrtGGet  PrtGGoto  PrtGInit  PrtGJobProperties PrtGJobProps  PrtGNewPage  PrtGOpenPrintJob  PrtGPrintBitmap PrtGBitMap and PrtGBitMapColor  PrtGPrintBox PrtGBox and PrtGBoxColor  PrtGPrinterDialog PrtGPrinterDlg  PrtGPrinterList  PrtGPrintCentered PrtGCentre  PrtGPrintFile  PrtGPrintJustified PrtGJustified  PrtGPrintLeft PrtGWrite  PrtGPrintLine PrtGWriteln  PrtGPrintRight PrtGJustRight  PrtGSet  PrtGSetDlgButtonTexts  PrtGSetFooter  PrtGSetHeader  PrtGSetHdrLineFont  PrtGSetMargins  PrtGSetPrintColors  PrtGSetPrinter  PrtGStartCol  PrtGStartRow  PrtGStartTable  PrtGTab  PrtGTerm ═══ 10.1. PrtGAbortPrintJob ═══ ═══ PrtGAbortPrintJob - List ═══ Topics  Description  Parameters See Also  PrtGClosePrintJob  PrtGOpenPrintJob ═══ PrtGAbortPrintJob - Parameters ═══ htbl Handle to the table definition created with PrtGDefineTable ═══ PrtGAbortPrintJob - Description ═══ USHORT PrtGAbortPrintJob( HTABLE htbl); Aborts the print job and deletes the document from the print queue. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE An invalid job handle was passed PRTGR_ERR_NO_JOB There is no job running to abort ═══ 10.2. PrtGAddColumn ═══ ═══ PrtGAddColumn - List ═══ Topics  Description  Parameters See Also  PrtGDefineTable  PrtGResetColHeader  PrtGStartTable ═══ PrtGAddColumn - Description ═══ USHORT PrtGAddColumn( HTABLE htbl, USHORT usCol, ULONG ulLeft, ULONG ulWide, PSZ pszTtile); Adds a column definition to a table definition. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE An invalid table handle was passed ═══ PrtGAddColumn - Parameters ═══ htbl Handle to the table definition created with PrtGDefineTable usCol Number of the column. The Column numbering is in real world numbers i.e. starting at 1 ulLeft The distance of the left edge of the column from the left margin in mm ulWide The width of the cells in the column in mm pszTitle A pointer to a NULL terminated string containing the column header text ═══ 10.3. PrtGAddHeaderLine ═══ ═══ PrtGAddHeaderLine - List ═══ Topics  Description  Parameters See Also  PrtGDefineHeader  PrtGSetHeader  PrtGOpenPrintJob ═══ PrtGAddHeaderLine - Description ═══ USHORT PrtGAddHeaderLine( HHEADER hhdr, USHORT usLine, PSZ pszString); Defines a text line in the page header. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE An invalid header handle is passed PRTGR_ERR_PARAMETER usLine is out of range i.e. greater than 5 or less than 1 ═══ PrtGAddHeaderLine - Parameters ═══ hhdr Handle to a header definition returned by PrtGDefineHeader usLine The number of the line in the header. Line numbers are in real world numbers i.e. 1 to 5 pszString Pointer to a NULL terminated string with the text to appear on the line. This text can contain Formatting Characters ═══ 10.4. PrtGClosePrintJob ═══ ═══ PrtGClosePrintJob - List ═══ Topics  Description  Parameters See Also  PrtGOpenPrintJob  PrtGInit  PrtGTerm ═══ PrtGClosePrintJob - Description ═══ USHORT PrtGClosePrintJob( HGRPRT hp); Closes the current job and resets all the internal variables associated with the presentation space. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised ═══ PrtGClosePrintJob - Parameters ═══ hp handle to the printing environment returned by PrtGInit ═══ 10.5. PrtGDefineFooter ═══ ═══ PrtGDefineFooter - List ═══ Topics  Description  Parameters See Also  PrtGDefineHeader  PrtGSetFooter  PrtGDestroyFtrDef ═══ PrtGDefineFooter - Description ═══ HFOOTER PrtGDefineFooter( BOOL bPrint, PSZ pszFont, ULONG ulPts, ULONG ulFill, ULONG ulLine, PSZ pszString); Builds an internal structure used to define the footer for the pages in a print job. This structure is available for re-use untill it is explicitly destroyed with PrtGDestroyFtrDef Return Handle to a footer description that can then be passed to PrtGSetFooter ═══ PrtGDefineFooter - Parameters ═══ bPrint Boolean flag (TRUE = Print footers, FALSE = do not print footers) pszFont Font name to print the footer ulPts Point size for the footer font ulFill The fill style for the box containing the footer ulLine The thickness (in TWIPS) of the line around the box containing the footer. pszString Text to print in the footer. This text can contain Formatting Characters ═══ 10.6. PrtGDefineHeader ═══ ═══ PrtGDefineHeader - List ═══ Topics  Description  Parameters See Also  PrtGAddHeaderLine  PrtGDefineFooter  PrtGSetHeader ═══ PrtGDefineHeader - Description ═══ HHEADER PrtGDefineHeader( BOOL bPrint, BOOL bAllPages, PSZ pszFont, ULONG ulPts, ULONG ulFill, ULONG ulLine, USHORT usLines); Builds an internal structure used to define the header for the pages in a print job. This structure is available for re-use until it is explicitly destroyed with PrtGDestroyHdrDef. Before calling PrtGSetHeader you must set the header texts using calls to PrtGAddHeaderLine. Return Handle to a header definition which can be passed to PrtGSetHeader ═══ PrtGDefineHeader - Parameters ═══ bPrint Flag indicating if page headers should be printed. bAllPages If TRUE the headers are repeated an all the pages, otherwise a header is only printed on the first page. pszFont Font name to print the header ulPts Point size for the header font ulFill The fill style for the box containing the headerer ulLine The thickness (in TWIPS) of the line around the box containing the header. usLines The number of lines printed in the header (1 to 5) ═══ 10.7. PrtGDefineTable ═══ ═══ PrtGDefineTable - List ═══ Topics  Description  Parameters See Also  PrtGAddColumn  PrtGStartTable ═══ PrtGDefineTable - Description ═══ HTABLE PrtGDefineTable( BOOL boxed, BOOL bHeader, BOOL bAllPages, ULONG ulLine, ULONG ulFill, ULONG ulHline, ULONG ulHfill, PSZ pszFont, ULONG ulPts, USHORT usCols); Builds an internal table definition which is available for re-use until explicitly destroyed using PrtGDestroyTblDef. Return A handle to a table definition structure wich can then be used to define the columns with PrtGAddColumn and start printing a table with PrtGStartTable ═══ PrtGDefineTable - Parameters ═══ boxed If TRUE the cells will have a box around them bHeader If TRUE headers are defined for each column bAllPages If TRUE use running headers i.e. the table header will be printed on each page ulLine The line thickness around the cells in the table ulFill The fill style for the cells in the table ulHline The line thickness around the header cells ulHfill The fill style for the header cells pszFont The font used to print the header texts ulPts The point size for printing the header texts usCols The number of columns in the table ═══ 10.8. PrtGDefineFtrColors ═══ ═══ PrtGDefineFtrColors - List ═══ Topics  Description  Parameters See Also  PrtGDefineFooter  PrtGSetFooter ═══ PrtGDefineFtrColors - Description ═══ USHORT PrtGDefineFtrColors( HFOOTER hftr, LONG lt_color, LONG lb_color, LONG lf_color); Define the colors used for printing the page footers. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE An invalid handle was passed ═══ PrtGDefineFtrColors - Parameters ═══ hftr Handle to a footer definition created with PrtGDefineFooter lt_color Color for printing the text in the footer lb_color Color for printing the border around the footer lf_color Color for printing the fill pattern in the footer ═══ 10.9. PrtGDefineHdrColors ═══ ═══ PrtGDefineHdrColors - List ═══ Topics  Description  Parameters See Also  PrtGDefineHeader  PrtGAddHeaderLine  PrtGSetHeader ═══ PrtGDefineHdrColors - Description ═══ USHORT PrtGDefineHdrColors( HHEADER hhdr, LONG lt_color, LONG lb_color, LONG lf_color); Define the colors used for printing the page headers. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE An invalid handle was passed ═══ PrtGDefineHdrColors - Parameters ═══ hhdr Handle to a header defintion created with PrtGDefineHeader lt_color Color for printing the text in the header lb_color Color for printing the border around the header lf_color Color for printing the fill pattern in the header ═══ 10.10. PrtGDefineTableColors ═══ ═══ PrtGDefineTableColors - List ═══ Topics  Description  Parameters See Also  PrtGDefineTable  PrtGAddColumn  PrtGStartTable ═══ PrtGDefineTableColors - Description ═══ USHORT PrtGDefineTableColors( HTABLE htbl, LONG lct_color, LONG lcb_color, LONG lcf_color, LONG lht_color, LONG lhb_color, LONG lhf_color); Defines the colors for printing a table defined with . Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE An invalid handle was passed ═══ PrtGDefineTableColors - Parameters ═══ htbl Handle to a table definition created with PrtGDefineTable lct_color Color for printing the text in the table cells lcb_color Color for printing the borders around the table cells lcf_color Color for printing the fill pattern in the table cells lht_color Color for printing the text in the table headers lhb_color Color for printing the borders around the table headers lhf_color Color for printing the fill pattern in the table headers ═══ 10.11. PrtGDestroyFtrDef ═══ ═══ PrtGDestroyFtrDef - List ═══ Topics  Description  Parameters See Also  PrtGDefineFooter ═══ PrtGDestroyFtrDef - Description ═══ HFOOTER PrtGDestroyFtrDef( HFOOTER hftr); Destroys the internal structure defining the page footers for a job. Return NULLHANDLE ═══ PrtGDestroyFtrDef - Parameters ═══ hftr Handle to a footer definition created with PrtGDefineFooter ═══ 10.12. PrtGDestroyHdrDef ═══ ═══ PrtGDestroyHdrDef - List ═══ Topics  Description  Parameters See Also  PrtGDefineHeader  PrtGAddHeaderLine ═══ PrtGDestroyHdrDef - Description ═══ HHEADER PrtGDestroyHdrDef( HHEADER hhdr); Destroys the internal structure defining the page headers for a job. Return NULLHANDLE ═══ PrtGDestroyHdrDef - Parameters ═══ hhdr Handle to a header defintion created with PrtGDefineHeader ═══ 10.13. PrtGDestroyTblDef ═══ ═══ PrtGDestroyTblDef - List ═══ Topics  Description  Parameters See Also  PrtGDefineTable  PrtGAddColumn ═══ PrtGDestroyTblDef - Description ═══ HTABLE PrtGDestroyTblDef( HTABLE htbl); Destroys the internal structure defining a table with its columns. Return NULLHANDLE ═══ PrtGDestroyTblDef - Parameters ═══ htbl Handle to a table definition created with PrtGDefineTable ═══ 10.14. PrtGEndRow ═══ ═══ PrtGEndRow - List ═══ Topics  Description  Parameters See Also  PrtGStartRow  PrtGStartCol  PrtGEndTable ═══ PrtGEndRow - Description ═══ USHORT PrtGEndRow( HGRPRT hp); Draws all the cells from the current row and prints all the texts that have been written to the columns since the previous call to PrtGStartRow. if any of the cells is longer than the available space on the page, it will be wrapped over to the next page and if running table headers are defined they will be printed. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised PRTGR_ERR_NOT_TABLE No table has been started ═══ PrtGEndRow - Parameters ═══ hp Handle to the printing environment returned from PrtGInit ═══ 10.15. PrtGEndTable ═══ ═══ PrtGEndTable - List ═══ Topics  Description  Parameters See Also  PrtGEndRow  PrtGDefineTable  PrtGStartTable ═══ PrtGEndTable - Description ═══ USHORT PrtGEndTable( HGRPRT hp); Ends printing to a table. Before calling this function, ensure that you have printed the last row with a call to PrtGEndRow Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised PRTGR_ERR_NOT_TABLE No table has been started ═══ PrtGEndTable - Parameters ═══ hp Handle to the printing environment returned from PrtGInit ═══ 10.16. PrtGFontDialog ═══ ═══ PrtGFontDialog - List ═══ Topics  Description  Parameters See Also  PrtGPrintCentered  PrtGPrintJustified  PrtGPrintRight  PrtGPrinterDialog  PrtGPrintLeft  PrtGPrintLine ═══ PrtGFontDialog - Description ═══ PSZ PrtGFontDlg( HGRPRT hp, PSZ pszTitle, PSZ pszOldFace); Calls the system font dialog with the fonts for the selected printer. If no printer has been explicitly defined, the default system printer will be used. Return The name of the chosen font or a NULL string if the Cancel button was pressed. Note: It is the responsibility of the calling process to check the validity of the returned pointer and to free it when no longer needed. Figure: Font Dialog. ═══ PrtGFontDialog - Parameters ═══ hp Handle to the printing environment returned from PrtGInit pszTitle The title to appear in the dialog. pszOldFace The default font family name. ═══ 10.17. PrtGGet ═══ ═══ PrtGGet - List ═══ Topics  Description  Parameters See Also  ═══ PrtGGet - Description ═══ PROP_TYPE PrtGGet( HGRPRT hp, USHORT prop, PUSHORT perror); Retrieves the value of the given Property. Return A string pointer, an unsigned long or a boolean depending on the property. It also returns an error code in the variable pointed to by perror: PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised PRTGR_ERR_READONLY The property is a read onlz property PRTGR_ERR_INV_PROP The prop parameter is out of range PRTGR_ERR_INV_VALUE The value parameter is invalid ═══ PrtGGet - Parameters ═══ hp Handle to the printing environment returned from PrtGInit prop One of the Printer Properties constants perror Variable that will contain any error code when the function returns ═══ 10.18. PrtGGoto ═══ ═══ PrtGGoto - List ═══ Topics  Description  Parameters See Also  None ═══ PrtGGoto - Description ═══ USHORT PrtGGoto( HGRPRT hp, ULONG ulx, ULONG uly, BOOL points); Moves the Gpi cursor to the given position. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised ═══ PrtGGoto - Parameters ═══ hp Handle to the printing environment returned from PrtGInit ulx x coordinate in mm from left margin uly y coordinate from the bottom margin points If TRUE the measures are points otherwise they are mm or 1/10 inch ═══ 10.19. PrtGInit ═══ ═══ PrtGInit - List ═══ Topics  Description  Parameters See Also  PrtGTerm ═══ PrtGInit - Description ═══ HGRPRT PrtGInit( HWND hwndParent, PFNNP pnp_func); Initialises the internal structures needed to handle print jobs and returns a handle which is required by all other printing functions. Return Handle to the printing environment. ═══ PrtGInit - Parameters ═══ hwndParent Handle of the parent window for dialog functions pnp_func Pointer to the new page hook function ═══ 10.20. PrtGJobProperties ═══ ═══ PrtGJobProperties - List ═══ Topics  Description  Parameters See Also  PrtGPrinterDialog  PrtGPrinterList  PrtGSetPrinter ═══ PrtGJobProperties - Description ═══ USHORT PrtGJobProps( HGRPRT hp, HWND hwndParent); Shows the job properties dialog for the current printer. Warning: This functions requires the presence of a PM Queue. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised Figure: Printer Job Properties Dialog for a Laserjet IIIP. ═══ PrtGJobProperties - Parameters ═══ hp Handle to the printing environment returned from PrtGInit hwndParent Handle to the parent window (calling window) ═══ 10.21. PrtGMoveX ═══ ═══ PrtGMoveX - List ═══ Topics  Description  Parameters See Also  PrtGGoto  PrtGMoveY ═══ PrtGMoveX - Description ═══ USHORT PrtGMoveX( HGRPRT hp, ULONG relX, BOOL points); Moves the graphics printing cursor horizontally relative to the current position. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised ═══ PrtGMoveX - Parameters ═══ Parameters hp Handle to the printing environment returned from PrtGInit relX number of points or units to move. If the number is negative, the cursor is moved to the left. points flag indicating whether to use the default Measures. or points. FALSE = Use default measure TRUE = use Points ═══ 10.22. PrtGMoveY ═══ ═══ PrtGMoveY - List ═══ Topics  Description  Parameters See Also  PrtGGoto  PrtGMoveX ═══ PrtGMoveY - Description ═══ USHORT PrtGMoveY( HGRPRT hp, ULONG relY, BOOL points); Moves the graphics printing cursor horizontally relative to the current position. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised ═══ PrtGMoveY - Parameters ═══ Parameters hp Handle to the printing environment returned from PrtGInit relY number of points or units to move. If the number is negative, the cursor is moved to the left. points flag indicating whether to use the default Measures. or points. FALSE = Use default measure TRUE = use Points ═══ 10.23. PrtGNewPage ═══ ═══ PrtGNewPage - List ═══ Topics  Description  Parameters See Also  None ═══ PrtGNewPage - Description ═══ USHORT PrtGNewPage( HGRPRT hp); Forces a new page to be started. If a header or footer is defined, these will be printed to the new page. If a table is being printed and the table has running headers defined, the column headers will be printed. The new page will only be started when you make the next PrtGEndRow call. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised ═══ PrtGNewPage - Parameters ═══ hp Handle to the printing environment returned from PrtGInit ═══ 10.24. PrtGOpenPrintJob ═══ ═══ PrtGOpenPrintJob - List ═══ Topics  Description  Parameters See Also  PrtGSetFooter  PrtGSetHeader  PrtGSetMargins  PrtGPrinterDialog  PrtGSetLineSpace ═══ PrtGOpenPrintJob - Description ═══ USHORT PrtGOpenPrintJob( HGRPRT hp, PSZ pszTitle, USHORT usPages); Opens a new print job with the defined header, footer and printer. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised PRTGR_ERR_NO_PRINTER There are no printers available to the work-station. PRTGR_ERR_JOB_OPEN failed to greate the print job (Error in Gpi or Dev call) ═══ PrtGOpenPrintJob - Parameters ═══ hp Handle to the printing environment returned from PrtGInit pszTitle The Document name which will appear in the spooler usPages The total number of pages to print. ═══ 10.25. PrtGPrintBitmap ═══ ═══ PrtGPrintBitmap - List ═══ Topics  Description  Parameters See Also  PrtGPrintBox  PrtGPrintWinImage ═══ PrtGPrintBitmap - Description ═══ USHORT PrtGPrintBitmap( HGRPRT hp, PSZ pszFName, ULONG ulLeft, ULONG ulBottom, ULONG ulRight, ULONG ulTop, ULONG ulLine, LONG lcborder); Opens a bitmap file (Win or OS/2) and prints it in the defined box with a frame ulLine TWIPS thick. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised PRTGR_ERR_INV_BITMAP The file contained an invalid bitmap PRTGR_ERR_INV_FILENAME There was an I/O error opening the bitmap file or the file does not exist. ═══ PrtGPrintBitmap - Parameters ═══ hp Handle to the printing environment returned by PrtGInit pszFName Name of the file to print. ulLeft Left edge of the box to contain the bitmap in mm from the left margin ulBottom Bottom edge of the box to contain the bitmap in mm from the bottom margin ulRight Right edge of the box to contain the bitmap in mm from the left margin ulTop Top edge of the box to contain the bitmap in mm from the bottom margin ulLine Thickness of a frame to draw around the bitmap (TWIPS) lcborder Color for the border drawn around the bitmap ═══ 10.26. PrtGPrintBox ═══ ═══ PrtGPrintBox - List ═══ Topics  Description  Parameters See Also  PrtGPrintBitmap  PrtGPrintWinImage ═══ PrtGPrintBox - Description ═══ USHORT PrtGPrintBox( HGRPRT hp, ULONG ulLeft, ULONG ulBottom, ULONG ulRight, ULONG ulTop, ULONG ulLine, ULONG ulFill, LONG lcborder, LONG lcfill); Draws a box with the defined line thickness and fill style at the given coordinates. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised ═══ PrtGPrintBox - Parameters ═══ hp Handle to the printing environment returned by PrtGInit pszFName Name of the file to print. ulLeft Left edge of the box in mm from the left margin ulBottom Bottom edge of the box in mm from the bottom margin ulRight Right edge of the box in mm from the left margin ulTop Top edge of the box in mm from the bottom margin ulLine Thickness of a frame to draw around the box (TWIPS) ulFill Fill style of the box lcborder Colour for the line around the box lcfill Colour for the fill pattern of the box ═══ 10.27. PrtGPrinterDialog ═══ ═══ PrtGPrinterDialog - List ═══ Topics  Description  Parameters See Also  PrtGSetPrinter  PrtGPrinterList  PrtGJobProperties ═══ PrtGPrinterDialog - Description ═══ PSZ PrtGPrinterDlg( HGRPRT hp, HWND hwndParent, PSZ pszTitle); Shows a dialog with a list of the available printers for the work-station. The default printer will be highlighted. You can set the job properties for any of the printers in the list. Return Name of the printer chosen or an empty string if the cancel button is pressed. Warning: Do not free this pointer as it points to a field in an internal structure. Figure: Printer Dialog. ═══ PrtGPrinterDialog - Parameters ═══ hp Handle to the printing environment returned from PrtGInit hwndParent Handle to the parent window (calling window) pszTitle The title for the dialog. If this is a NULL pointer then "Choose Printer" will be displayed in the title bar. ═══ 10.28. PrtGPrinterList ═══ ═══ PrtGPrinterList - List ═══ Topics  Description  Parameters See Also  PrtGPrinterDialog  PrtGSetPrinter ═══ PrtGPrinterList - Description ═══ PSZ *PrtGPrinterList( HGRPRT hp, BOOL bRefresh, PUSHORT pusCount); Returns a list of the available printers. No printer is selected by this function: if you want to use a printer other than the default, you must use PrtGSetPrinter. Return Pointer to an array *pusCount long of strings. Warning: It is the responsibility of the calling program to free this array. ═══ PrtGPrinterList - Parameters ═══ hp Handle to the printing environment returned from PrtGInit bRefresh If this is set to TRUE the internal list of printers will be refreshed, otherwise the list shown will the one read with PrtGInit or the last call to the function pusCount Pointer to a USHORT that will hold the number of printers found. ═══ 10.29. PrtGPrintCentered ═══ ═══ PrtGPrintCentered - List ═══ Topics  Description  Parameters See Also  PrtGPrintJustified  PrtGPrintRight  PrtGPrintLeft  PrtGPrintLine  PrtGFontDialog ═══ PrtGPrintCentered - Description ═══ USHORT PrtGPrintCentered( HGRPRT hp, PSZ pszFont, ULONG ulPts, PSZ pszString); Prints the text centered between the margins. If the text is too long to fit on one line, it will be wrapped over several lines. If you are within a table, the text will be written to the current column defined by PrtGStartCol. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised PRTGR_ERR_PARAMETER pstString is a NULL pointer ═══ PrtGPrintCentered - Parameters ═══ hp Handle to the printing environment returned by PrtGInit. pszFont Name of the font to use for printing the text. if this is an empty ("") string or a NULL Pointer, the current font is used. ulPts The point size of the font to use. If this value is 0, the current point size is is used. pszString The string to print. ═══ 10.30. PrtGPrintFile ═══ ═══ PrtGPrintFile - List ═══ Topics  Description  Parameters See Also  PrtGPrintJustified  PrtGPrintRight  PrtGPrintLeft  PrtGPrintLine  PrtGFontDialog ═══ PrtGPrintFile - Description ═══ USHORT PrtGPrintFile( HGRPRT hp, PSZ pszFont, ULONG ulPts, USHORT usStyle PSZ pszFile); Prints the text contained in the file in the specified style. If the text is too long to fit on one line, it will be wrapped over several lines. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised PRTGR_ERR_PARAMETER pszFile is a NULL pointer PRTGR_ERR_INV_FILENAME pszFile does not exist ═══ PrtGPrintFile - Parameters ═══ hp Handle to the printing environment returned by PrtGInit. pszFont Name of the font to use for printing the text. if this is an empty ("") string or a NULL Pointer, the current font is used. ulPts The point size of the font to use. If this value is 0, the current point size is is used. usStyle One of the Print Styles for Files constants pszFile Name of the file to print. ═══ 10.31. PrtGPrintJustified ═══ ═══ PrtGPrintJustified - List ═══ Topics  Description  Parameters See Also  PrtGPrintCentered  PrtGPrintRight  PrtGPrintLeft  PrtGPrintLine  PrtGFontDialog ═══ PrtGPrintJustified - Description ═══ USHORT PrtGPrintJustified( HGRPRT hp, PSZ pszFont, ULONG ulPts, PSZ pszString); Prints the text in the requested font and point size justified between the left and right margins. If the text is too long to fit on one line, it will be wrapped over several lines. If you are within a table, the text will be written to the current column defined by PrtGStartCol. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised PRTGR_ERR_PARAMETER pstString is a NULL pointer ═══ PrtGPrintJustified - Parameters ═══ hp Handle to the printing environment returned by PrtGInit. pszFont Name of the font to use for printing the text. if this is an empty ("") string or a NULL Pointer, the current font is used. ulPts The point size of the font to use. If this value is 0, the current point size is is used. pszString The string to print. ═══ 10.32. PrtGPrintLeft ═══ ═══ PrtGPrintLeft - List ═══ Topics  Description  Parameters See Also  PrtGPrintCentered  PrtGPrintJustified  PrtGPrintRight  PrtGPrintLine  PrtGFontDialog ═══ PrtGPrintLeft - Description ═══ USHORT PrtGPrintLeft( HGRPRT hp, PSZ pszFont, ULONG ulPts, PSZ pszString); Write the text in the specified font and point size justified left. If the text is too long to fit on one line, it will be wrapped over several lines. If you are within a table, the text will be written to the current column defined by PrtGStartCol. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised PRTGR_ERR_PARAMETER pstString is a NULL pointer ═══ PrtGPrintLeft - Parameters ═══ hp Handle to the printing environment returned by PrtGInit. pszFont Name of the font to use for printing the text. if this is an empty ("") string or a NULL Pointer, the current font is used. ulPts The point size of the font to use. If this value is 0, the current point size is is used. pszString The string to print. ═══ 10.33. PrtGPrintLine ═══ ═══ PrtGPrintLine - List ═══ Topics  Description  Parameters See Also  PrtGPrintCentered  PrtGPrintJustified  PrtGPrintRight  PrtGPrintLeft  PrtGFontDialog ═══ PrtGPrintLine - Description ═══ USHORT PrtGPrintLine( HGRPRT hp, PSZ pszFont, ULONG ulPts, PSZ pszString); Write the text in the specified font and point size justified left followed by linefeed and carriage return. If the text is too long to fit on one line, it will be wrapped over several lines. If you are within a table, the text will be written to the current column defined by PrtGStartCol. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised PRTGR_ERR_PARAMETER pstString is a NULL pointer ═══ PrtGPrintLine - Parameters ═══ hp Handle to the printing environment returned by PrtGInit. pszFont Name of the font to use for printing the text. if this is an empty ("") string or a NULL Pointer, the current font is used. ulPts The point size of the font to use. If this value is 0, the current point size is is used. pszString The string to print. ═══ 10.34. PrtGPrintRight ═══ ═══ PrtGPrintRight - List ═══ Topics  Description  Parameters See Also  PrtGPrintCentered  PrtGPrintJustified  PrtGPrintLeft  PrtGPrintLine  PrtGFontDialog ═══ PrtGPrintRight - Description ═══ USHORT PrtGPrintRight( HGRPRT hp, PSZ pszFont, ULONG ulPts, PSZ pszString); Prints the text right justified to the right margin in the specified font and font size. If the text is too long to fit on one line, it will be wrapped over several lines. If you are within a table, the text will be written to the current column defined by PrtGStartCol. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised PRTGR_ERR_PARAMETER pstString is a NULL pointer ═══ PrtGPrintRight - Parameters ═══ hp Handle to the printing environment returned by PrtGInit. pszFont Name of the font to use for printing the text. if this is an empty ("") string or a NULL Pointer, the current font is used. ulPts The point size of the font to use. If this value is 0, the current point size is is used. pszString The string to print. ═══ 10.35. PrtGPrintWinImage ═══ ═══ PrtGPrintWinImage - List ═══ Topics  Description  Parameters See Also  PrtGPrintBitmap  PrtGPrintBox. ═══ PrtGPrintWinImage - Description ═══ USHORT PrtGPrintWinImage( HGRPRT hp, HWND hwnd, ULONG ulLeft, ULONG ulBottom, ULONG ulRight, ULONG ulTop, ULONG ulLine, LONG lcborder); Prints an image of the contents of a window. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised ═══ PrtGPrintWinImage - Parameters ═══ hp Handle to the printing environment returned by PrtGInit. hwnd Handle of the window whose contents you want to print ulLeft Lower left X coordinate taken from the left margin in millimetres or 1/10 inch depending on the Measures property ulBottom Lower left Y coordinate taken from the bottom margin in millimetres or 1/10 inch depending on the Measures property ulRight Upper right X coordinate taken from the left margin in millimetres or 1/10 inch depending on the Measures property. if this parameter is 0 the image will be printed with the same width as the object on the screen. ulTop Upper right Y coordinate taken from the bottom margin in millimetres or 1/10 inch depending on the Measures property. if this parameter is 0 the image will be printed with the same height as the object on the screen. ulLine Thickness of the box line in TWIPS ( 56.7 TWIPS = 1mm) lcborder The colour of the line around the image. ═══ 10.36. PrtGResetColHeader ═══ ═══ PrtGResetColHeader - List ═══ Topics  Description  Parameters See Also  PrtGDefineTable  PrtGAddColumn  PrtGStartTable ═══ PrtGResetColHeader - Description ═══ USHORT PrtGResetColHeader( HGRPRT hp, USHORT usCol, PSZ pszText) Changes the header text for a column in a table that is printing. This function can be used to modify the the running header text for a table while it is printing. Note: the original text declared with PrtGDefineTable and PrtGAddColumn will always be printed when PrtGStartTable is called. Warning: This function will return an error if called before PrtGStartTable Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised PRTGR_ERR_NOT_TABLE No table has been started with PrtGStartTable PRTGR_ERR_PARAMETER usCol is out of range i.e. greater than the number of declared columns or less than 1 ═══ PrtGResetColHeader - Parameters ═══ hp Handle to the printing environment returned from PrtGInit usCol Column number whose header text is to be changed (1..n) pszText New column header text ═══ 10.37. PrtGSet ═══ ═══ PrtGSet - List ═══ Topics  Description  Parameters See Also  ═══ PrtGSet - Description ═══ USHORT PrtGSet( HGRPRT hp, USHORT prop, PROP_TYPE value); Retrieves the value of the given Property. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised PRTGR_ERR_READONLY The property is a read onlz property PRTGR_ERR_INV_PROP The prop parameter is out of range PRTGR_ERR_INV_VALUE The value parameter is invalid ═══ PrtGSet - Parameters ═══ hp Handle to the printing environment returned from PrtGInit prop One of the Printer Properties constants value The new value to set ═══ 10.38. PrtGSetDlgButtonTexts ═══ ═══ PrtGSetDlgButtonTexts - List ═══ Topics  Description  Parameters See Also  PrtGPrinterDialog ═══ PrtGSetDlgButtonTexts - Description ═══ USHORT PrtGSetDlgButtonTexts( HGRPRT hp, PSZ pszBut1, PSZ pszBut2, PSZ pszBut3); Change the texts for the buttons on the printer dialog. If any of the parameters is NULL, the button remains unchanged. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised ═══ PrtGSetDlgButtonTexts - Parameters ═══ hp Handle to the printing environment returned from PrtGInit pszBut1 New text for the OK button pszBut2 New text for the Job properties... button pszBut3 New text for the Cancel button ═══ 10.39. PrtGSetFooter ═══ ═══ PrtGSetFooter - List ═══ Topics  Description  Parameters See Also  PrtGDefineFooter  PrtGDestroyFtrDef ═══ PrtGSetFooter - Description ═══ USHORT PrtGSetFooter( HGRPRT hp, HFOOTER hftr); Sets the footer for the current job from the definition in hftr. After this call, you can destroy the footer definition with PrtGDestroyFtrDef Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised ═══ PrtGSetFooter - Parameters ═══ hp Handle to the printing environment returned from PrtGInit hftr Handle to a footer definition created with PrtGDefineFooter ═══ 10.40. PrtGSetHeader ═══ ═══ PrtGSetHeader - List ═══ Topics  Description  Parameters See Also  PrtGDefineHeader  PrtGAddHeaderLine  PrtGDestroyHdrDef ═══ PrtGSetHeader - Description ═══ USHORT PrtGSetHeader( HGRPRT hp, HHEADER hhdr); Sets the page headers for the current job using the definition hhdr. After this call you can destroy the header defintion with PrtGDestroyHdrDef Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised ═══ PrtGSetHeader - Parameters ═══ hp Handle to the printing environment returned from PrtGInit hhdr Handle to a header definition created with PrtGDefineHeader and PrtGAddHeaderLine ═══ 10.41. PrtGSetHdrLineFont ═══ ═══ PrtGSetHdrLineFont - List ═══ Topics  Description  Parameters See Also  PrtGDefineHeader  PrtGAddHeaderLine  PrtGDestroyHdrDef ═══ PrtGSetHdrLineFont - Description ═══ USHORT PrtGSetHdrLineFont( HHEADER hhdr, USHORT usLine, PSZ pszFont, ULONG ulPoints); Changes the font and/or point size for one line in the header. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE An invalid handle was passed. ═══ PrtGSetHdrLineFont - Parameters ═══ hhdr Handle to a header definition created with PrtGDefineHeader and PrtGAddHeaderLine usLine The line number (1..5) pszFont The new font name, if NULL the original font is used ulPoints The new point size to use. If 0 then the original pointsize is used ═══ 10.42. PrtGSetMargins ═══ ═══ PrtGSetMargins - List ═══ Topics  Description  Parameters See Also  PrtGSetPrintColors  PrtGSetFooter  PrtGSetHeader  PrtGOpenPrintJob ═══ PrtGSetMargins - Description ═══ USHORT PrtGSetMargins( HGRPRT hp, ULONG ulLeft, ULONG ulRight, ULONG ulTop, ULONG ulBottom, ULONG ulBorder, ULONG ulFill); Defines the printing margins for the job, whether there is a border and how thick and whether the page has a background fill. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised ═══ PrtGSetMargins - Parameters ═══ hp Handle to the printing environment returned from PrtGInit ulLeft Distance of left margin from the left edge of the page in mm ulRight Distance of right margin from the right edge of the page in mm ulTop Distance of top margin from the top edge of the page in mm ulBottom Distance of bottom margin from the bottom edge of the page in mm ulBorder Thickness (in TWIPS) of a border drawn just outside the margins ulFill Fill style for the page. ═══ 10.43. PrtGSetPrintColors ═══ ═══ PrtGSetPrintColors - List ═══ Topics  Description  Parameters See Also  PrtGDefineFtrColors  PrtGDefineHdrColors  PrtGSetMargins ═══ PrtGSetPrintColors - Description ═══ USHORT PrtGSetPrintColors( HGRPRT hp, LONG lt_color, LONG lb_color, LONG lf_color); Define the colors used for printing. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE An invalid handle was passed ═══ PrtGSetPrintColors - Parameters ═══ hp Handle to the printing environment returned from PrtGInit lt_color Default color for printing lb_color Color for printing the border around pages lf_color Color for printing the fill pattern in pages ═══ 10.44. PrtGSetPrinter ═══ ═══ PrtGSetPrinter - List ═══ Topics  Description  Parameters See Also  PrtGPrinterList  PrtGPrinterDialog ═══ PrtGSetPrinter - Description ═══ USHORT PrtGSetPrinter( HGRPRT hp, USHORT usIdx); Allows you to select a printer without calling PrtGPrinterDlg. Along with PrtGPrinterList, this function can be used to create yur own printer selection dialog. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised ═══ PrtGSetPrinter - Parameters ═══ hp Handle to the printing environment returned from PrtGInit usIdx Real world index (1 to n) to the array of printers returned by PrtGPrinterList. An index of 0 will select the default system printer. ═══ 10.45. PrtGStartCol ═══ ═══ PrtGStartCol - List ═══ Topics  Description  Parameters See Also  PrtGStartRow  PrtGStartTable  PrtGEndRow ═══ PrtGStartCol - Description ═══ USHORT PrtGStartCol( HGRPRT hp, USHORT usCol); Start sending all following print commands to the specified column in the current table. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised PRTGR_ERR_NOT_TABLE No table has been started with PrtGStartTable PRTGR_ERR_PARAMETER Column number is either 0 or greater than the number of columns declared for the table ═══ PrtGStartCol - Parameters ═══ hp Handle to the printing environment returned from PrtGInit usCol Column number to start (1 based) ═══ 10.46. PrtGStartRow ═══ ═══ PrtGStartRow - List ═══ Topics  Description  Parameters See Also  PrtGEndRow  PrtGStartCol  PrtGStartTable ═══ PrtGStartRow - Description ═══ USHORT PrtGStartRow( HGRPRT hp); Start printing a new row in the table. This function clears internal flags on the columns. Failure to call this function can cause unexpected results. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised ═══ PrtGStartRow - Parameters ═══ hp Handle to the printing environment returned from PrtGInit ═══ 10.47. PrtGStartTable ═══ ═══ PrtGStartTable - List ═══ Topics  Description  Parameters See Also  PrtGDefineTable  PrtGAddColumn  PrtGStartRow  PrtGStartCol  PrtGEndRow  PrtGEndTable  PrtGResetColHeader ═══ PrtGStartTable - Description ═══ USHORT PrtGStartTable( HGRPRT hp, HTABLE htbl); Start printing the table defined by htbl. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised or the table handle is invalid PRTGR_ERR_PARAMETER The number of columns defines to the table definition in PrtGDefineTable is out of range ═══ PrtGStartTable - Parameters ═══ hp Handle to the printing environment returned from PrtGInit htbl Handle to a table definition made with PrtGDefineTable ═══ 10.48. PrtGTab ═══ ═══ PrtGTab - List ═══ Topics  Description  Parameters See Also  None ═══ PrtGTab - Description ═══ USHORT PrtGTab( HGRPRT hp); Move the Gpi cursor to the next tab stop. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised ═══ PrtGTab - Parameters ═══ hp Handle to the printing environment returned from PrtGInit ═══ 10.49. PrtGTerm ═══ ═══ PrtGTerm - List ═══ Topics  Description  Parameters See Also  PrtGInit ═══ PrtGTerm - Description ═══ VOID PrtGTerm( HGRPRT hp); Terminate the printing environment. Thsi deallocates all memory and invalidates the handle. Warning: Any calls to PRTGRAFC functions using hp made after this call will generate access violations unless hp is set to NULLHANDLE. Return None ═══ PrtGTerm - Parameters ═══ hp Handle to the printing environment returned from PrtGInit ═══ 11. Old Functions Still Maintained ═══ The following section describes some of the functions from version 1.x that have been replaced by PrtGGet and PrtGSet. For backward compatibility these functions sre maintained as are the old named of printing functions.  PrtGCurrentPrinter  PrtGGetPageSize  PrtGSetLineSpace  PrtGVersion ═══ 11.1. PrtGCurrentPrinter ═══ PSZ PrtGCurrentPrinter( HGRPRT hp); Parameters hp handle to the printing environment returned by PrtGInit Description Get the name of the current selected printer. Warning: The returned string pointer must not be freed by calling application. Return Returns the name of the current printer or a NULL pointer if there is an error. ═══ 11.2. PrtGGetPageSize ═══ USHORT PrtGGetPageSize( HGRPRT hp, PULONG pulWide, PULONG pulHigh); Parameters hp Handle to the printing environment returned from PrtGInit pulWide Pointer to a ULONG that will contain the width of the page in mm pulHigh Pointer to a ULONG that will contain the height of the page in mm Description Returns the width of the page from left to right margin and the height of the page from bottom to top margin in mm. Use this function to help calculate positions for printing. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised Related functions  PrtGGoto ═══ 11.3. PrtGSetLineSpace ═══ USHORT PrtGSetLineSpace( HGRPRT hp, USHORT usPercent); Parameters hp Handle to the printing environment returned from PrtGInit usPercent The percentage of the font hight to use for the interline space. The default is 120 = single space Description Sets the inter line spacing for the following writes as a proportion of the font point size.. Return PRTGR_OK The operation was successful PRTGR_ERR_INV_HANDLE The printing environment has not been initialised Related functions  PrtGCentre  PrtGJustified  PrtGWrite  PrtGWriteln ═══ 11.4. PrtGVersion ═══ PSZ PrtGVersion( VOID); Parameters None Description Get the version number of the PRTGRAFC DLL. Return String representation of the DLL version number. Note: It is the responsibility of the calling process to free the string when it is no longer needed. Related functions  None