home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / prtgr22.zip / prtrdemo.VRX < prev    next >
Text File  |  1996-04-21  |  36KB  |  1,260 lines

  1. /*:VRX         Main
  2. */
  3. /*  Main
  4. */
  5. Main:
  6. /*  Process the arguments.
  7.     Get the parent window.
  8. */
  9.     parse source . calledAs .
  10.     parent = ""
  11.     argCount = arg()
  12.     argOff = 0
  13.     if( calledAs \= "COMMAND" )then do
  14.         if argCount >= 1 then do
  15.             parent = arg(1)
  16.             argCount = argCount - 1
  17.             argOff = 1
  18.         end
  19.     end; else do
  20.         call VROptions 'ImplicitNames'
  21.     end
  22.     InitArgs.0 = argCount
  23.     if( argCount > 0 )then do i = 1 to argCount
  24.         InitArgs.i = arg( i + argOff )
  25.     end
  26.     drop calledAs argCount argOff
  27.  
  28. /*  Load the windows
  29. */
  30.     call VRInit
  31.     parse source . . spec
  32.     _VREPrimaryWindowPath = ,
  33.         VRParseFileName( spec, "dpn" ) || ".VRW"
  34.     _VREPrimaryWindow = ,
  35.         VRLoad( parent, _VREPrimaryWindowPath )
  36.     drop parent spec
  37.     if( _VREPrimaryWindow == "" )then do
  38.         call VRMessage "", "Cannot load window:" VRError(), ,
  39.             "Error!"
  40.         _VREReturnValue = 32000
  41.         signal _VRELeaveMain
  42.     end
  43.  
  44. /*  Process events
  45. */
  46.     call Init
  47.     signal on halt
  48.     do while( \ VRGet( _VREPrimaryWindow, "Shutdown" ) )
  49.         _VREEvent = VREvent()
  50.         interpret _VREEvent
  51.     end
  52. _VREHalt:
  53.     _VREReturnValue = Fini()
  54.     call VRDestroy _VREPrimaryWindow
  55. _VRELeaveMain:
  56.     call VRFini
  57. exit _VREReturnValue
  58.  
  59. VRLoadSecondary:
  60.     __vrlsWait = abbrev( 'WAIT', translate(arg(2)), 1 )
  61.     if __vrlsWait then do
  62.         call VRFlush
  63.     end
  64.     __vrlsHWnd = VRLoad( VRWindow(), VRWindowPath(), arg(1) )
  65.     if __vrlsHWnd = '' then signal __vrlsDone
  66.     if __vrlsWait \= 1 then signal __vrlsDone
  67.     call VRSet __vrlsHWnd, 'WindowMode', 'Modal' 
  68.     __vrlsTmp = __vrlsWindows.0
  69.     if( DataType(__vrlsTmp) \= 'NUM' ) then do
  70.         __vrlsTmp = 1
  71.     end
  72.     else do
  73.         __vrlsTmp = __vrlsTmp + 1
  74.     end
  75.     __vrlsWindows.__vrlsTmp = VRWindow( __vrlsHWnd )
  76.     __vrlsWindows.0 = __vrlsTmp
  77.     do while( VRIsValidObject( VRWindow() ) = 1 )
  78.         __vrlsEvent = VREvent()
  79.         interpret __vrlsEvent
  80.     end
  81.     __vrlsTmp = __vrlsWindows.0
  82.     __vrlsWindows.0 = __vrlsTmp - 1
  83.     call VRWindow __vrlsWindows.__vrlsTmp 
  84.     __vrlsHWnd = ''
  85. __vrlsDone:
  86. return __vrlsHWnd
  87.  
  88. /*:VRX         CB_1_Click
  89. */
  90. CB_1_Click: 
  91.     
  92.     /***** Enable or disable spin buttoms *******************************/
  93.     
  94.     if VRGet( CB_1, 'Set') then do
  95.         call VRSet SPIN_1, 'Enabled', 1
  96.         call VRSet SPIN_4, 'Enabled', 1
  97.     end
  98.     else do
  99.         call VRSet SPIN_1, 'Enabled', 0
  100.         call VRSet SPIN_4, 'Enabled', 0
  101.     end
  102.  
  103. return
  104.  
  105. /*:VRX         Fini
  106. */
  107. Fini:
  108.     call PrtGRxTerm prt
  109.     call PrtGrxDropFuncs
  110.     window = VRWindow()
  111.     call VRSet window, "Visible", 0
  112.     drop window
  113.  
  114. return 0
  115.  
  116. /*:VRX         front_page_Close
  117. */
  118. front_page_Close: 
  119.     call front_page_Fini
  120. return
  121.  
  122. /*:VRX         front_page_Create
  123. */
  124. front_page_Create: 
  125.     call front_page_Init
  126. return
  127.  
  128. /*:VRX         front_page_Fini
  129. */
  130. front_page_Fini: 
  131.     window = VRInfo( "Window" )
  132.     call VRDestroy window
  133.     drop window
  134. return
  135. /*:VRX         front_page_Init
  136. */
  137. front_page_Init: 
  138.     window = VRInfo( "Object" )
  139.     if( \VRIsChildOf( window, "Notebook" ) ) then do
  140.         call VRMethod window, "CenterWindow"
  141.         call VRSet window, "Visible", 1
  142.         call VRMethod window, "Activate"
  143.     end
  144.     drop window
  145. return
  146.  
  147. /*:VRX         front_page_Resize
  148. */
  149. front_page_Resize: 
  150.     call resize_dlg front_page, GB_11
  151.     if loading then do
  152.         call VRSet "NB_1", "Selected", 2
  153.         call VRSet "NB_1", "Selected", 3
  154.         call VRSet "NB_1", "Selected", 4
  155.         call VRSet "NB_1", "Selected", 5
  156.         call VRSet "NB_1", "Selected", 6
  157.         call VRSet "NB_1", "Selected", 1
  158.         loading = 0
  159.         call VRSet "NB_1", "Painting", 1;
  160.     end
  161. return
  162.  
  163. /*:VRX         ftr_dlg_Close
  164. */
  165. ftr_dlg_Close: 
  166.     call ftr_dlg_Fini
  167. return
  168.  
  169. /*:VRX         ftr_dlg_Create
  170. */
  171. ftr_dlg_Create: 
  172.     call ftr_dlg_Init
  173. return
  174.  
  175. /*:VRX         ftr_dlg_Fini
  176. */
  177. ftr_dlg_Fini: 
  178.     window = VRInfo( "Window" )
  179.     call VRDestroy window
  180.     drop window
  181. return
  182. /*:VRX         ftr_dlg_Init
  183. */
  184. ftr_dlg_Init: 
  185.     window = VRInfo( "Object" )
  186.     if( \VRIsChildOf( window, "Notebook" ) ) then do
  187.         call VRMethod window, "CenterWindow"
  188.         call VRSet window, "Visible", 1
  189.         call VRMethod window, "Activate"
  190.     end
  191.     drop window
  192. return
  193.  
  194. /*:VRX         ftr_dlg_Resize
  195. */
  196. ftr_dlg_Resize: 
  197.     call resize_dlg ftr_dlg, GB_5
  198. return
  199.  
  200. /*:VRX         Halt
  201. */
  202. Halt:
  203.     call PrtGRxTerm prt
  204.     call PrtGrxDropFuncs
  205.     signal _VREHalt
  206. return
  207.  
  208. /*:VRX         hdr_ftr_dlg_Close
  209. */
  210. hdr_ftr_dlg_Close: 
  211.     call hdr_ftr_dlg_Fini
  212. return
  213.  
  214. /*:VRX         hdr_ftr_dlg_Create
  215. */
  216. hdr_ftr_dlg_Create: 
  217.     call hdr_ftr_dlg_Init
  218. return
  219.  
  220. /*:VRX         hdr_ftr_dlg_Fini
  221. */
  222. hdr_ftr_dlg_Fini: 
  223.     window = VRInfo( "Window" )
  224.     call VRDestroy window
  225.     drop window
  226. return
  227. /*:VRX         hdr_ftr_dlg_Init
  228. */
  229. hdr_ftr_dlg_Init: 
  230.     window = VRInfo( "Object" )
  231.     if( \VRIsChildOf( window, "Notebook" ) ) then do
  232.         call VRMethod window, "CenterWindow"
  233.         call VRSet window, "Visible", 1
  234.         call VRMethod window, "Activate"
  235.     end
  236.     drop window
  237. return
  238.  
  239. /*:VRX         hdr_ftr_dlg_Resize
  240. */
  241. hdr_ftr_dlg_Resize: 
  242.     call resize_dlg hdr_ftr_dlg, GB_4
  243. return
  244.  
  245. /*:VRX         idm_about_Click
  246. */
  247. idm_about_Click: 
  248.     wTitle = 'VRPrint Demo v' || version
  249.     call aboutwin VRWindow(), wTitle
  250. return
  251.  
  252. /*:VRX         idm_exit_Click
  253. */
  254. idm_exit_Click: 
  255.     call Quit
  256. return
  257.  
  258. /*:VRX         idm_prt_setup_Click
  259. */
  260. idm_prt_setup_Click: 
  261.     
  262.     /***** Call the printers dialog *************************************/
  263.     
  264.     buttons.0 = 3
  265.     buttons.1 = '~Accept'
  266.     buttons.2 = '~Job Properties...'
  267.     buttons.3 = 'Cancel'
  268.  
  269.     pName = PrtGRxPrinterDialog( prt, 'Choose printer', 'buttons.');
  270.     if pName = '' then
  271.         pName = PrtGRxGet( prt, "CurrentPrinter");
  272.     wTitle = 'VRPrinter Demo v' || version '-' pName
  273.     call VRSet Window1, 'Caption', wTitle
  274.  
  275. return
  276.  
  277. /*:VRX         Init
  278. */
  279. Init:
  280.  
  281.     call RxFuncAdd 'PrtGRxLoadFuncs', 'PRTGRAPH', 'PrtGRxLoadFuncs'
  282.     call PrtGRxLoadFuncs
  283.  
  284.     prt = PrtGRxInit();
  285.  
  286.     window = VRWindow()
  287.     call VRMethod window, "CenterWindow"
  288.  
  289.     loading = 1;
  290.  
  291.     call VRRedirectStdIO 'Off'
  292.  
  293.     call VRSet window, "Visible", 1
  294.     call VRMethod window, "Activate"
  295.  
  296.     /***** Set the title of the window **********************************/
  297.     
  298.     pName = PrtGRxGet( prt, "CurrentPrinter");
  299.     version = PrtGRxGet( prt, "Version");
  300.     wTitle = 'PrtGraph Demo v' || version '-' pName
  301.     call VRSet window, 'Caption', wTitle
  302.     
  303.     /***** Get the path to the OS/2 logo ********************************/
  304.     
  305.     set_path = VALUE( 'VXREXX', , 'OS2ENVIRONMENT');
  306.     bmp_name = set_path || '\addlogo.bmp'
  307.     jpeg_name = set_path || '\testorig.jpg'
  308.  
  309.     call VRSet "NB_1", "Painting", 0;
  310.  
  311.     drop window ver set_path bootdrive
  312.  
  313. return
  314.  
  315. /*:VRX         Page_dlg_Close
  316. */
  317. Page_dlg_Close: 
  318.     call Page_dlg_Fini
  319. return
  320.  
  321. /*:VRX         Page_dlg_Create
  322. */
  323. Page_dlg_Create: 
  324.     call Page_dlg_Init
  325. return
  326.  
  327. /*:VRX         Page_dlg_Fini
  328. */
  329. Page_dlg_Fini: 
  330.     window = VRInfo( "Window" )
  331.     call VRDestroy window
  332.     drop window
  333. return
  334. /*:VRX         Page_dlg_Init
  335. */
  336. Page_dlg_Init: 
  337.     window = VRInfo( "Object" )
  338.     if( \VRIsChildOf( window, "Notebook" ) ) then do
  339.         call VRMethod window, "CenterWindow"
  340.         call VRSet window, "Visible", 1
  341.         call VRMethod window, "Activate"
  342.     end
  343.     drop window
  344. return
  345.  
  346. /*:VRX         Page_dlg_Resize
  347. */
  348. Page_dlg_Resize: 
  349.     call resize_dlg Page_dlg, GB_7
  350. return
  351.  
  352. /*:VRX         PB_1_Click
  353. */
  354. PB_1_Click: 
  355.     
  356.     /***** Get Page settings ********************************************/
  357.     
  358.     border = VRGet( CB_1, 'Set');
  359.     if border then do
  360.         thick = VRGet( SPIN_1, 'Value');
  361.         style = VRGet( SPIN_4, 'Value');
  362.     end
  363.     else do
  364.         thick = 0;
  365.         style = 0;
  366.     end
  367.     bcolor = VRGet( "DDCB_bcolor", "Value");
  368.     fcolor = VRGet( "DDCB_fcolor", "Value");
  369.     tcolor = VRGet( "DDCB_color", "Value");
  370.  
  371.     call PrtGRxSet prt, "PrintColor", tcolor
  372.  
  373.     /***** Get header settings ******************************************/
  374.     
  375.     header = VRGet( CB_2, 'Set');
  376.     allpages = VRGet( CB_4, 'Set');
  377.     if header then do
  378.         hthick = VRGet( SPIN_2, 'Value');
  379.         hstyle = VRGet( SPIN_3, 'Value');
  380.     end
  381.     else do
  382.         hthick = 0;
  383.         hstyle = 0;
  384.     end
  385.     hlcolor = VRGet( "DDCB_hlcolor", "Value");
  386.     hfcolor = VRGet( "DDCB_hfcolor", "Value");
  387.     htcolor = VRGet( "DDCB_htcolor", "Value");
  388.  
  389.     htext1 = VRGet( "EF_3", "value");
  390.     htext2 = VRGet( "EF_4", "value");
  391.     htext3 = VRGet( "EF_5", "value");
  392.     htext4 = VRGet( "EF_6", "value");
  393.     hlines = 4;
  394.     if htext4 = '' then do
  395.         hlines = 3;
  396.         if htext3 = '' then do
  397.             hlines = 2
  398.             if htext2 = '' then do
  399.                 hlines = 1
  400.                 if htext1 = '' then do
  401.                     hlines = 0
  402.                     header = 0
  403.                 end
  404.             end
  405.         end
  406.     end
  407.  
  408.     /***** Get footer settings ******************************************/
  409.     
  410.     footer = VRGet( CB_3, 'Set');
  411.     if footer then do
  412.         fthick = VRGet( SPIN_6, 'Value');
  413.         fstyle = VRGet( SPIN_5, 'Value');
  414.     end
  415.     else do
  416.         fthick = 0;
  417.         fstyle = 0;
  418.     end
  419.     flcolor = VRGet( "DDCB_flcolor", "Value");
  420.     ffcolor = VRGet( "DDCB_ffcolor", "Value");
  421.     ftcolor = VRGet( "DDCB_ftcolor", "Value");
  422.  
  423.     ftext = VRGet( "EF_8", "value");
  424.     if ftext = '' then
  425.         ftext = '$▌$rpage $#'
  426.  
  427.     /***** Get table settings ******************************************/
  428.     
  429.     tthick = VRGet( SPIN_15, 'Value');
  430.     tstyle = VRGet( SPIN_14, 'Value');
  431.     tlcolor = VRGet( "DDCB_tlcolor", "Value");
  432.     tfcolor = VRGet( "DDCB_tfcolor", "Value");
  433.     ttcolor = VRGet( "DDCB_ttcolor", "Value");
  434.  
  435.     ththick = VRGet( SPIN_13, 'Value');
  436.     thstyle = VRGet( SPIN_12, 'Value');
  437.     thlcolor = VRGet( "DDCB_thlcolor", "Value");
  438.     thfcolor = VRGet( "DDCB_thfcolor", "Value");
  439.     thtcolor = VRGet( "DDCB_thtcolor", "Value");
  440.  
  441.     /***** Get margins for page *****************************************/
  442.     
  443.     lm = VRGet( SPIN_10, 'Value');
  444.     rm = VRGet( SPIN_9, 'Value');
  445.     tm = VRGet( SPIN_8, 'Value');
  446.     bm = VRGet( SPIN_7, 'Value');
  447.     ils = VRGet( SPIN_11, 'Value');
  448.  
  449.     /***** Find what we want to print ***********************************/
  450.     
  451.     if VRGet( RB_1, 'Set') then do
  452.         pstyle = 1
  453.         text_style = 'L'
  454.     end
  455.     if VRGet( RB_2, 'Set') then do
  456.         pstyle = 2
  457.         text_style = 'R'
  458.     end
  459.     if VRGet( RB_3, 'Set') then do
  460.         pstyle = 3
  461.         text_style = 'C'
  462.     end
  463.     if VRGet( RB_4, 'Set') then do
  464.         pstyle = 4
  465.         text_style = 'J'
  466.     end
  467.     if VRGet( RB_5, 'Set') then
  468.         pstyle = 5
  469.     if VRGet( RB_6, 'Set') then
  470.         pstyle = 6
  471.     if VRGet( RB_7, 'Set') then
  472.         pstyle = 7
  473.     if VRGet( RB_8, 'Set') then
  474.         pstyle = 8
  475.     if VRGet( RB_9, 'Set') then do
  476.         pstyle = 9
  477.         text_file_name = VRGet( "EF_2", "Value");
  478.         if text_file_name = '' then do
  479.             call beep 1000, 1000
  480.             return
  481.         end
  482.     end
  483.     if VRGet( RB_10, 'Set') then
  484.         pstyle = 10
  485.     
  486.     /***** get the font face name ***************************************/
  487.     
  488.     facename = VRGet( EF_1, 'Value');
  489.     if facename = '' then do
  490.         call beep 1000, 1000
  491.         return
  492.     end
  493.  
  494.     p = pos( '.', facename) + 1;
  495.     facename = substr( facename, p);
  496.  
  497.     call VRSet Window1, 'pointer', 'wait'
  498.     
  499.     /***** Set the margins **********************************************/
  500.     
  501.     rcy = PrtGRxSetMargins( prt, lm, rm, tm, bm, thick, style, bcolor, fcolor);
  502.     
  503.     /***** Set the header mode ******************************************/
  504.     
  505.     rcy = PrtGRxSetHeaderMode( prt, header, facename, 10, hstyle, hthick, allpages, hlcolor, hfcolor, htcolor);
  506.     
  507.     /***** Set the header ***********************************************/
  508.     
  509.     rcy = PrtGRxSetHeader( prt, hlines, htext1, htext2, htext3, htext4);
  510.     
  511.     if hlines > 0 then
  512.         rcy = PrtGRxSetHeaderLineFont( prt, 1,,14);
  513.  
  514.     /***** Set the footer if any ****************************************/
  515.     
  516.     if footer then do
  517.         rcy = PrtGRxSetFooter( prt, facename, 8, fstyle, fthick, ftext, flcolor, ffcolor, ftcolor);
  518.     end
  519.     
  520.     /***** Open the print job *******************************************/
  521.     
  522.     rcy = PrtGRxOpenPrintJob( prt, 'Test Printing');
  523.  
  524.     /***** Check that everything was ok *********************************/
  525.     
  526.     if \rcy then do
  527.         call VRSet Window1, 'pointer', '<default>'
  528.         return
  529.     end
  530.  
  531.     call PrintItAll
  532.  
  533.     call VRSet Window1, 'pointer', '<default>'
  534.  
  535. return
  536.  
  537. /*:VRX         PB_2_Click
  538. */
  539. PB_2_Click: 
  540.     call Quit
  541. return
  542.  
  543. /*:VRX         PB_3_Click
  544. */
  545. PB_3_Click: 
  546.     
  547.     /***** Get the font for printing ************************************/
  548.  
  549.     face = VRGet( EF_1, 'Value')
  550.     p = pos( '.', face)
  551.     if p > 0 then
  552.         face = word( substr( face, p + 1), 1);
  553.     else
  554.         face = ''
  555.     font = PrtGRxFontDialog( prt, 'Choose Font for Printing', face);
  556.     if font <> '' then
  557.         call VRSet EF_1, 'Value', font
  558.  
  559.     drop font face
  560. return
  561.  
  562. /*:VRX         PB_4_Click
  563. */
  564. PB_4_Click: 
  565.     
  566.     /***** Get/Set the job properties for selected printer **************/
  567.     
  568.     rcy = PrtGRxJobProperties( prt);
  569. return
  570.  
  571. /*:VRX         PB_5_Click
  572. */
  573. PB_5_Click: 
  574.     call idm_prt_setup_Click
  575. return
  576.  
  577. /*:VRX         PB_7_Click
  578. */
  579. PB_7_Click: 
  580.     
  581.     FileName = VRFileDialog( VRWindow(), "Pick text file to print", "Open", "*.*", , ,  )
  582.     
  583.     if FileName <> '' then
  584.         call VRSet EF_2, 'Value', FileName
  585.  
  586.     drop FileName
  587. return
  588.  
  589. /*:VRX         Print_dlg_Close
  590. */
  591. Print_dlg_Close: 
  592.     call Print_dlg_Fini
  593. return
  594.  
  595. /*:VRX         Print_dlg_Create
  596. */
  597. Print_dlg_Create: 
  598.     call Print_dlg_Init
  599. return
  600.  
  601. /*:VRX         Print_dlg_Fini
  602. */
  603. Print_dlg_Fini: 
  604.     window = VRInfo( "Window" )
  605.     call VRDestroy window
  606.     drop window
  607. return
  608. /*:VRX         Print_dlg_Init
  609. */
  610. Print_dlg_Init: 
  611.     window = VRInfo( "Object" )
  612.     if( \VRIsChildOf( window, "Notebook" ) ) then do
  613.         call VRMethod window, "CenterWindow"
  614.         call VRSet window, "Visible", 1
  615.         call VRMethod window, "Activate"
  616.     end
  617.     drop window
  618. return
  619.  
  620. /*:VRX         Print_dlg_Resize
  621. */
  622. Print_dlg_Resize: 
  623.     call resize_dlg Print_dlg, GB_6
  624. return
  625.  
  626. /*:VRX         PrintItAll
  627. */
  628. PrintItAll: 
  629.     /***** Set the line spacing for printing ****************************/
  630.     
  631.     rcy = PrtGRxSet( prt, "LineSpace", ils);
  632.  
  633.     rcy = PrtGRxResetHeader( prt, 2,,);
  634.  
  635.     /***** Set the texts for printing ***********************************/
  636.     
  637.     txt1 = 'Hello everyone, this is some text in'
  638.     txt2 = 'point which wraps over several lines.'
  639.     txt3 = 'This is so that you can see how the VRPrinter methods work.'
  640.     txt4 = 'We hope that you will find them useful.'
  641.     
  642.     select
  643.         
  644.         /***** If left justified text demo ******************************/
  645.         
  646.         when pstyle = 1 then do
  647.             fnt = 8
  648.             rcy = PrtGRxPrintLine( prt, facename, fnt, txt1 facename fnt txt2 txt3 txt4);
  649.             rcy = PrtGRxPrintLine( prt, , fnt, '');
  650.             do fnt = 10 to 24 by 2
  651.                 rcy = PrtGRxPrintLine( prt, , fnt, txt1 facename fnt txt2 txt3 txt4);
  652.                 rcy = PrtGRxPrintLine( prt, , fnt, '');
  653.             end
  654.         end
  655.         
  656.         /***** If right justified text demo *****************************/
  657.         
  658.         when pstyle = 2 then do
  659.             fnt = 8
  660.             rcy = PrtGRxPrintRight( prt, facename, fnt, txt1 facename fnt txt2 txt3 txt4);
  661.             rcy = PrtGRxPrintLine( prt, , fnt, '');
  662.             do fnt = 10 to 24 by 2
  663.                 rcy = PrtGRxPrintRight( prt, , fnt, txt1 facename fnt txt2 txt3 txt4);
  664.                 rcy = PrtGRxPrintLine( prt, , fnt, '');
  665.             end
  666.         end
  667.         
  668.         /***** If centred text demo *************************************/
  669.         
  670.         when pstyle = 3 then do
  671.             fnt = 8
  672.             rcy = PrtGRxPrintCentered( prt, facename, fnt, txt1 facename fnt txt2 txt3 txt4);
  673.             rcy = PrtGRxPrintLine( prt, , fnt, '');
  674.             do fnt = 10 to 24 by 2
  675.                 rcy = PrtGRxPrintCentered( prt, , fnt, txt1 facename fnt txt2 txt3 txt4);
  676.                 rcy = PrtGRxPrintLine( prt, , fnt, '');
  677.             end
  678.         end
  679.         
  680.         /***** If justified text demo ***********************************/
  681.         
  682.         when pstyle = 4 then do
  683.             fnt = 8
  684.             rcy = PrtGRxPrintJustified( prt, facename, fnt, txt1 facename fnt txt2 txt3 txt4);
  685.             rcy = PrtGRxPrintLine( prt, , fnt, '');
  686.             do fnt = 10 to 24 by 2
  687.                 rcy = PrtGRxPrintJustified( prt, , fnt, txt1 facename fnt txt2 txt3 txt4);
  688.                 rcy = PrtGRxPrintLine( prt, , fnt, '');
  689.             end
  690.         end
  691.         
  692.         /***** If print bitmap demo *************************************/
  693.         
  694.         when pstyle = 5 then do
  695.             rcy = PrtGRxPrintLine( prt, facename, 14, 'Here are some bitmaps');
  696.             rcy = PrtGRxPrintBitMap( prt, "$101", 20, 120, 120, 220, 28, ,'Fig 1. - A bitmap from exe resource');
  697.             rcy = PrtGRxPrintBitMap( prt, bmp_name, 30, 20, 110, 95, 56, ,'Fig 2. - A bitmap from a file');
  698.  
  699.             rcy = PrtGRxNewPage( prt);
  700.  
  701.             rcy = PrtGRxPrintLine( prt, facename, 14, 'Here is a bitmap and a JPEG (if you have djpeg.exe)');
  702.             hmod = PrtGRxLoadResMod( "RESOURCE");
  703.             rcy = PrtGRxPrintBitMap( prt, hmod || "$100", 20, 120, 120, 220, 28, ,'Fig 3. - A bitmap from a DLL');
  704.             rcy = PrtGRxPrintJPEG( prt, jpeg_name, 30, 20, 110, 95, 56, ,'Fig 4. - A JPEG image');
  705.  
  706.             rcy = PrtGRxNewPage( prt);
  707.             rcy = PrtGRxPrintCentered( prt, facename, 10, 'This one has no title and no declared dimensions');
  708.             rcy = PrtGRxGoto( prt, 50, 100);
  709.             rcy = PrtGRxPrintBitMap( prt, bmp_name,,,,, 14);
  710.             rcy = PrtGRxFreeResMod( hmod)
  711.         end
  712.         
  713.         /***** If print table demo **************************************/
  714.         
  715.         when pstyle = 6 then do
  716.             rcy = PrtGRxPrintLine( prt, facename, 12, 'Example of printing a table with different styles in each cell');
  717.             rcy = PrtGRxPrintLine( prt,,,'');
  718.             rcy = PrtGRxPrintLine( prt,,,'Table created with StartTable');
  719.             call WriteTable
  720.  
  721.             rcy = PrtGRxPrintLine( prt,facename, 12,'');
  722.             rcy = PrtGRxPrintLine( prt, facename, 12, 'Table created with DefineTable & NewPage between rows');
  723.             rcy = PrtGRxPrintLine( prt,facename, 12,'');
  724.             call WriteTable3
  725.  
  726.             rcy = PrtGRxPrintLine( prt,facename, 12,'');
  727.             rcy = PrtGRxPrintLine( prt, facename, 12, 'Table created with DefineTable and with bitmaps');
  728.             rcy = PrtGRxPrintLine( prt,facename, 12,'');
  729.             call WriteTable2
  730.  
  731.         end
  732.         
  733.         /***** If styles demo *******************************************/
  734.         
  735.         when pstyle = 7 then do
  736.             call PrintStyles
  737.         end
  738.         
  739.         /***** If tabbing and goto demo *********************************/
  740.         
  741.         when pstyle = 8 then do
  742.             call PrintTabbedText
  743.         end
  744.  
  745.         when pstyle = 9 then do
  746.             rcy = PrtGRxPrintFile( prt, "Courier", 8, text_style, text_file_name);
  747.         end
  748.  
  749.         when pstyle = 10 then do
  750.             hwnd = substr( VRGet( "Window1", "hWnd"), 6);
  751.             rcy = PrtGRxPrintWinImage( prt, hwnd, 20, 20, , , 0, ,'Fig 1. - Demo Window');
  752.             rcy = PrtGRxNewPage( prt);
  753.  
  754.             ok = VRMethod( "Screen", "ListWindows", "window.")
  755.             if ok = 1 then do
  756.                 found = 0
  757.                 do while( found = 0)
  758.                     idx = random( 1, window.0)
  759.                     w = word( window.idx, 1 )
  760.                     if VRGet( w, "Visible" ) = 1 then do
  761.                         rcy = VRMethod( w, "Activate");
  762.                         if VRGet( w, "WindowState") <> Minimized then do
  763.                             title_text = VRGet( w, "Caption" )
  764.                             rcy = PrtGRxPrintLine( prt, facename, 12,'Print image of' title_text);
  765.                             hwnd = substr( VRGet( w, "hWnd"), 6);
  766.                             rcy = PrtGRxPrintWinImage( prt, hwnd, 20, 20, , , 0, ,'Figure -' title_text);
  767.                             found = 1;
  768.                             rcy = VRMethod( "window1", "Activate");
  769.                         end
  770.                     end
  771.                 end
  772.             end
  773.             
  774.         end
  775.  
  776.     end
  777.     
  778.     /***** Close the print job ******************************************/
  779.     
  780.     rcy = PrtGRxClosePrintJob( prt);
  781.  
  782. return
  783.  
  784. /*:VRX         PrintStyles
  785. */
  786. PrintStyles: 
  787.     
  788.     wide = PrtGRxGet( prt, "PageWidth");
  789.     high = PrtGRxGet( prt, "PageHeight");
  790.  
  791.     /***** Calculate positions for printing *****************************/
  792.     
  793.     vpos1 = trunc( high / 3) * 2;
  794.     vpos2 = trunc( high / 3);
  795.     vinc = trunc( vpos2/ 3);
  796.  
  797.     by1 = vpos1 
  798.     ty1 = vpos1 + vinc
  799.     by2 = vpos2
  800.     ty2 = vpos2 + vinc
  801.  
  802.     hpos = trunc( wide / 8);
  803.     hinc = trunc( hpos / 3) * 2;
  804.  
  805.     bx = 5;
  806.     tx = bx + hinc;
  807.     
  808.     /***** Say what we are printing *************************************/
  809. /*    
  810.     rcy = PrtGRxPrintLine( prt, facename, 10, 'Defined styles for filling');
  811. */  
  812.     /***** print a row of boxes with different styles *******************/
  813.     
  814.     do style = 0 to 7
  815.         rcy = PrtGRxPrintBox( prt, bx, by1, tx, ty1, 28, style, "Red", "Blue");
  816.         rcy = PrtGRxGoto( prt, bx, by1 - 10);
  817.         rcy = PrtGRxPrintLeft( prt, facename, 10, 'Style' style);
  818.         bx = bx + hpos;
  819.         tx = tx + hpos;
  820.     end
  821.  
  822.     bx = 5;
  823.     tx = bx + hinc;
  824.     
  825.     /***** print a row of boxes with different styles *******************/
  826.     
  827.     do style = 8 to 15
  828.         rcy = PrtGRxPrintBox( prt, bx, by2, tx, ty2, 28, style, "Pink", "Green");
  829.         rcy = PrtGRxGoto( prt, bx, by2 - 10);
  830.         rcy = PrtGRxPrintleft( prt, facename, 10, 'Style' style);
  831.         bx = bx + hpos;
  832.         tx = tx + hpos;
  833.     end
  834.  
  835. return
  836.  
  837. /*:VRX         PrintTabbedText
  838. */
  839. PrintTabbedText: 
  840.     
  841.     /***** Get the page size ********************************************/
  842.     
  843.     wide = PrtGRxGet( prt, "PageWidth");
  844.     high = PrtGRxGet( prt, "PageHeight");
  845.     
  846.     /***** Calculate the number of tabs *********************************/
  847.     
  848.     numtabs = trunc( wide / 10) - 1;
  849.     
  850.     /***** Print '|' at each tab position *******************************/
  851.     
  852.     rcy = PrtGRxPrintLine( prt, facename, 10, 'Tab positions are shown on the next line');
  853.     rcy = PrtGRxPrintLine( prt, , , '');
  854.     rcy = PrtGRxPrintLeft( prt, , , '|');
  855.  
  856.     do i = 1 to numtabs
  857.         rcy = PrtGRxTab( prt);
  858.         rcy = PrtGRxPrintLeft( prt, , , '|');
  859.     end
  860.  
  861.     /***** show some moves **********************************************/
  862.  
  863.     rcy = PrtGRxPrintLine( prt, , , '');
  864.     rcy = PrtGRxPrintLine( prt, , , '');
  865.  
  866.     rcy = PrtGRxPrintLeft( prt, , ,'Here we are');
  867.     rcy = PrtGRxMoveX( prt, 10, 0);
  868.     rcy = PrtGRxPrintLeft( prt, , ,'1 cm right');
  869.  
  870.     rcy = PrtGRxMoveY( prt, -10, 0);
  871.     rcy = PrtGRxPrintLeft( prt, , ,'1 cm down');
  872.     rcy = PrtGRxMoveY( prt, 5, 1);
  873.     rcy = PrtGRxPrintLeft( prt, , ,'5 pts up');
  874.     rcy = PrtGRxMoveY( prt, -5, 1);
  875.     rcy = PrtGRxPrintLeft( prt, , ,'5 pts down');
  876.  
  877.     /***** Go to the bottom of the page *********************************/
  878.     
  879.     rcy = PrtGRxPrintLine( prt, , , '');
  880.  
  881.     rcy = PrtGRxMoveX( prt, 100, 0);
  882.     rcy = PrtGRxPrintLeft( prt, , ,'10 cm right');
  883.  
  884.     rcy = PrtGRxMoveX( prt, -50, 0);
  885.     rcy = PrtGRxPrintLeft( prt, , ,'5 cm left');
  886.  
  887.     rcy = PrtGRxPrintLine( prt, , , '');
  888.     rcy = PrtGRxPrintLine( prt, , , '');
  889.  
  890.     rcy = PrtGRxPrintLine( prt, , 20, 'The End');
  891.  
  892. return
  893.  
  894.     rcy = PrtGRxGoto( prt, 0, 10);
  895.     rcy = PrtGRxPrintLeft( prt, , , 'On the next page we show 20 random moves in an area within 200mm of the top margin and right margin');
  896.     rcy = PrtGRxNewPage( prt);
  897.  
  898.     vinc = high - 20;
  899.     hinc = wide - 20;
  900.     
  901.     /***** Do 20 random jumps around the page ***************************/
  902.     
  903.     do i = 1 to 20
  904.         x = random( 5, hinc)
  905.         y = random( 5, vinc)
  906.         rcy = PrtGRxGoto( prt, x, y);
  907.         rcy = PrtGRxPrintLeft( prt,,,'Jump' i x','y);
  908.     end
  909.  
  910. return
  911.  
  912. /*:VRX         Quit
  913. */
  914. Quit:
  915.     window = VRWindow()
  916.     call VRSet window, "Shutdown", 1
  917.     drop window
  918. return
  919.  
  920. /*:VRX         resize_dlg
  921. */
  922. resize_dlg:  procedure
  923.  
  924.     dlg = arg(1)
  925.     gbox = arg(2)
  926.  
  927.     h1 = VRGet( dlg, 'InteriorHeight');
  928.     h2 = VRGet( gbox, 'Height');
  929.     w1 = VRGet( dlg, 'Width');
  930.     w2 = VRGet( gbox, 'Width');
  931.     if w1 < w2 then
  932.         l = 0
  933.     else
  934.         l = trunc(( w1 - w2) / 2)
  935.  
  936.     if h1 < h2 then
  937.         t = 0
  938.     else
  939.         t = trunc(( h1 - h2) / 2)
  940.  
  941.     call VRSet gbox, 'Left', l
  942.     call VRSet gbox, 'Top', t
  943.  
  944. return
  945.  
  946. /*:VRX         table_dlg_Close
  947. */
  948. table_dlg_Close: 
  949.     call table_dlg_Fini
  950. return
  951.  
  952. /*:VRX         table_dlg_Create
  953. */
  954. table_dlg_Create: 
  955.     call table_dlg_Init
  956. return
  957.  
  958. /*:VRX         table_dlg_Fini
  959. */
  960. table_dlg_Fini: 
  961.     window = VRInfo( "Window" )
  962.     call VRDestroy window
  963.     drop window
  964. return
  965. /*:VRX         table_dlg_Init
  966. */
  967. table_dlg_Init: 
  968.     window = VRInfo( "Object" )
  969.     if( \VRIsChildOf( window, "Notebook" ) ) then do
  970.         call VRMethod window, "CenterWindow"
  971.         call VRSet window, "Visible", 1
  972.         call VRMethod window, "Activate"
  973.     end
  974.     drop window
  975. return
  976.  
  977. /*:VRX         table_dlg_Resize
  978. */
  979. table_dlg_Resize: 
  980.     call resize_dlg table_dlg, GB_13
  981. return
  982.  
  983. /*:VRX         tolower
  984. */
  985. tolower: procedure
  986.  
  987. parse arg str
  988.  
  989. tin = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
  990. tout = 'abcdefghijklmnopqrstuvwxyz'
  991.  
  992. retstr = translate( str, tout, tin);
  993.  
  994. return retstr
  995.  
  996. /*:VRX         Window1_Close
  997. */
  998. Window1_Close:
  999.     call Quit
  1000. return
  1001.  
  1002. /*:VRX         WriteTable
  1003. */
  1004. WriteTable: 
  1005.     
  1006.     /***** Initialise a table *******************************************/
  1007.     
  1008.     rcy = PrtGRxStartTable( prt, tstyle, tthick, 3, 10, 45, 50, 40);
  1009.  
  1010.     if rcy then do
  1011.         
  1012.         /***** Start printing a row *************************************/
  1013.         
  1014.         rcy = PrtGRxStartRow( prt);
  1015.  
  1016.         /***** write to col 1 *******************************************/
  1017.         
  1018.  
  1019.         rcy = PrtGRxStartCol( prt, 1);
  1020.         rcy = PrtGRxPrintRight( prt, 'Helvetica', 10, 'This is some text in the first column. It is not very long,');
  1021.         
  1022.         /***** write to col 2 *******************************************/
  1023.         
  1024.         rcy = PrtGRxStartCol( prt, 2);
  1025.         rcy = PrtGRxPrintJustified( prt, 'Helvetica Bold', 10, 'This is some text in the second column. It is not very long,');
  1026.         rcy = PrtGRxPrintJustified( prt,,,'This text has several lines and with a bit of luck should force a new page.');
  1027.         rcy = PrtGRxPrintJustified( prt,,,'If it does then we have a test of a cell rolling over from one page to the next and we will not have to write any more.');
  1028.         
  1029.         /***** write to col 3 *******************************************/
  1030.         
  1031.         rcy = PrtGRxStartCol( prt, 3);
  1032.         rcy = PrtGRxPrintCentered( prt, 'Helvetica Bold', 14, 'This is some text in the third column. It is not very long,');
  1033.         
  1034.         /***** print out the row ****************************************/
  1035.         
  1036.         rcy = PrtGRxEndRow( prt);
  1037.         
  1038.         /***** start the next row ***************************************/
  1039.         
  1040.         rcy = PrtGRxStartRow( prt);
  1041.         
  1042.         /***** write to col 1 *******************************************/
  1043.         
  1044.         rcy = PrtGRxStartCol( prt, 1);
  1045.         rcy = PrtGRxPrintRight( prt, 'Times New Roman', 10, 'This is some text in the first column. It is not very long,');
  1046.         
  1047.         /***** write to col 2 *******************************************/
  1048.         
  1049.         rcy = PrtGRxStartCol( prt, 2);
  1050.         rcy = PrtGRxPrintLeft( prt, 'Helvetica Bold', 10, 'This is some text in the second column. It is not very long and should be left justified.');
  1051.         rcy = PrtGRxPrintCentered( prt,,,'This text has several lines and with a bit of luck should be centred.');
  1052.         rcy = PrtGRxPrintJustified( prt,,,'This text here was designed to be justified and should roll over several lines, of course the last line will be left aligned.');
  1053.         rcy = PrtGRxPrintRight( prt,,,'This last bit of text should finally show all the styles in one cell as it is right aligned.');
  1054.         
  1055.         /***** write to col 3 *******************************************/
  1056.         
  1057.         rcy = PrtGRxStartCol( prt, 3);
  1058.         rcy = PrtGRxPrintJustified( prt, 'Times New Roman', 8, 'This is some text in the third column. It is not very long,');
  1059.         
  1060.         /***** print out the row ****************************************/
  1061.         
  1062.         rcy = PrtGRxEndRow( prt);
  1063.         
  1064.         /***** Terminate the table **************************************/
  1065.         
  1066.         rcy = PrtGRxEndTable( prt);
  1067.  
  1068.     end
  1069.     else
  1070.         rcy = PrtGRxPrintLeft( prt, 'Helvetica Bold', 14, 'ERROR - Failed to create the table...');
  1071.  
  1072. return
  1073.  
  1074. /*:VRX         WriteTable2
  1075. */
  1076. WriteTable2: 
  1077.  
  1078.  
  1079. /***** Define the table ********************************/
  1080.  
  1081. table.0 = 9
  1082. table.1 = tstyle
  1083. table.2 = tthick
  1084. table.3 = 1
  1085. table.4 = thstyle
  1086. table.5 = ththick
  1087. table.6 = 1
  1088. table.7 = 12
  1089. table.8 = 'Helvetica Bold'
  1090. table.9 = 10
  1091.  
  1092. /***** Make 3 columns ***********************************/
  1093.  
  1094. Cols.0.0 = 3
  1095.  
  1096. Cols.1.1 = 25
  1097. Cols.1.2 = 'Index'
  1098.  
  1099. Cols.2.1 = 50
  1100. Cols.2.2 = '$cImage'
  1101.  
  1102. Cols.3.1 = 70
  1103. Cols.3.2 = '$rRes Number'
  1104.  
  1105. names.0 = 18
  1106. names.1 = 'BLUJEAN.BMP'
  1107. names.2 = 'BOX.BMP'
  1108. names.3 = 'BRICK.BMP'
  1109. names.4 = 'BUTTERFL.BMP'
  1110. names.5 = 'COLUMNS.BMP'
  1111. names.6 = 'DELFT.BMP'
  1112. names.7 = 'FERNS.BMP'
  1113. names.8 = 'FLAMINGO.BMP'
  1114. names.9 = 'FLEUR.BMP'
  1115. names.10 = 'LEAVES.BMP'
  1116. names.11 = 'MAZE.BMP'
  1117. names.12 = 'ORCHIDS.BMP'
  1118. names.13 = 'OS2TILE.BMP'
  1119. names.14 = 'SHELLS.BMP'
  1120. names.15 = 'SUNFLOW.BMP'
  1121. names.16 = 'SWIRLS.BMP'
  1122. names.17 = 'TIEDYE.BMP'
  1123. names.18 = 'ZIGZAG.BMP'
  1124.  
  1125. rcy = PrtGRxDefineTable( prt, "table.", "Cols.");
  1126.  
  1127. /**** Start printing in the table **********************************/
  1128.  
  1129. if rcy then do
  1130.     hmod = PrtGRxLoadResMod( "RESOURCE");
  1131. say 'hmod for RESOURCE =' hmod
  1132.     do i = 1 to 18
  1133.         rcy = PrtGRxStartRow( prt);
  1134.         rcy = PrtGRxStartCol( prt, 1)
  1135.         rcy = PrtGRxPrintLeft( prt, 'Helvetica Bold', 10, i);
  1136.         rcy = PrtGRxStartCol( prt, 2)
  1137.         resnum = 100 + i;
  1138.         rcy = PrtGRxPrintBitMap( prt, hmod || '$' || resnum,,,,,,,names.i);
  1139.         rcy = PrtGRxStartCol( prt, 3)
  1140.         rcy = PrtGRxPrintRight( prt, 'Helvetica Bold', 10, resnum);
  1141.         rcy = PrtGRxEndRow( prt);
  1142.     end
  1143.     rcy = PrtGRxEndTable( prt);
  1144.     call PrtGRxFreeResMod hmod
  1145. end    
  1146. else
  1147.     rcy = PrtGRxPrintLine( prt, 'Helvetica Bold', 14, 'ERROR - Failed to create the table...');
  1148.  
  1149. return
  1150.  
  1151. /*:VRX         WriteTable3
  1152. */
  1153. WriteTable3: 
  1154.  
  1155.     /***** Define the table ********************************/
  1156.  
  1157.     table.0 = 15
  1158.     table.1 = tstyle
  1159.     table.2 = tthick
  1160.     table.3 = 1
  1161.     table.4 = thstyle
  1162.     table.5 = ththick
  1163.     table.6 = 1
  1164.     table.7 = 12
  1165.     table.8 = 'Helvetica Bold'
  1166.     table.9 = 10
  1167.     table.10 = ttcolor
  1168.     table.11 = tlcolor
  1169.     table.12 = tfcolor
  1170.     table.13 = thtcolor
  1171.     table.14 = thlcolor
  1172.     table.15 = thfcolor
  1173.  
  1174.     /***** Make 3 columns ***********************************/
  1175.  
  1176.     Cols.0.0 = 3
  1177.  
  1178.     Cols.1.1 = 45
  1179.     Cols.1.2 = 'Column 1'
  1180.  
  1181.     Cols.2.1 = 50
  1182.     Cols.2.2 = '$cColumn 2'
  1183.  
  1184.     Cols.3.1 = 40
  1185.     Cols.3.2 = '$rColumn 3'
  1186.  
  1187.     rcy = PrtGRxDefineTable( prt, "table.", "Cols.");
  1188.  
  1189.     if rcy then do
  1190.  
  1191.         /***** Change column headers for following pages ****************/
  1192.         
  1193.         call PrtGRxResetColHeader prt, 1, "New header 1"
  1194.         call PrtGRxResetColHeader prt, 2, "$rNew header 2"
  1195.         call PrtGRxResetColHeader prt, 3, "$cNew header 3"
  1196.  
  1197.         /***** Start printing a row *************************************/
  1198.         
  1199.         rcy = PrtGRxStartRow( prt);
  1200.  
  1201.         /***** write to col 1 *******************************************/
  1202.         
  1203.  
  1204.         rcy = PrtGRxStartCol( prt, 1);
  1205.         rcy = PrtGRxPrintRight( prt, 'Helvetica', 10, 'This is some text in the first column. It is not very long,');
  1206.         
  1207.         /***** write to col 2 *******************************************/
  1208.         
  1209.         rcy = PrtGRxStartCol( prt, 2);
  1210.         rcy = PrtGRxPrintJustified( prt, 'Helvetica Bold', 10, 'This is some text in the second column. It is not very long,');
  1211.         rcy = PrtGRxPrintJustified( prt,,,'This text has several lines and with a bit of luck should force a new page.');
  1212.         rcy = PrtGRxPrintJustified( prt,,,'If it does then we have a test of a cell rolling over from one page to the next and we will not have to write any more.');
  1213.         
  1214.         /***** write to col 3 *******************************************/
  1215.         
  1216.         rcy = PrtGRxStartCol( prt, 3);
  1217.         rcy = PrtGRxPrintCentered( prt, 'Helvetica Bold', 14, 'This is some text in the third column. It is not very long,');
  1218.         
  1219.         /***** print out the row ****************************************/
  1220.         
  1221.         rcy = PrtGRxEndRow( prt);
  1222.         rcy = PrtGRxNewPage( prt);
  1223.         
  1224.         /***** start the next row ***************************************/
  1225.         
  1226.         rcy = PrtGRxStartRow( prt);
  1227.         
  1228.         /***** write to col 1 *******************************************/
  1229.         
  1230.         rcy = PrtGRxStartCol( prt, 1);
  1231.         rcy = PrtGRxPrintRight( prt, 'Times New Roman', 10, 'This is some text in the first column. It is not very long,');
  1232.         
  1233.         /***** write to col 2 *******************************************/
  1234.         
  1235.         rcy = PrtGRxStartCol( prt, 2);
  1236.         rcy = PrtGRxPrintLeft( prt, 'Helvetica Bold', 10, 'This is some text in the second column. It is not very long and should be left justified.');
  1237.         rcy = PrtGRxPrintCentered( prt,,,'This text has several lines and with a bit of luck should be centred.');
  1238.         rcy = PrtGRxPrintJustified( prt,,,'This text here was designed to be justified and should roll over several lines, of course the last line will be left aligned.');
  1239.         rcy = PrtGRxPrintRight( prt,,,'This last bit of text should finally show all the styles in one cell as it is right aligned.');
  1240.         
  1241.         /***** write to col 3 *******************************************/
  1242.         
  1243.         rcy = PrtGRxStartCol( prt, 3);
  1244.         rcy = PrtGRxPrintJustified( prt, 'Times New Roman', 8, 'This is some text in the third column. It is not very long,');
  1245.         
  1246.         /***** print out the row ****************************************/
  1247.         
  1248.         rcy = PrtGRxEndRow( prt);
  1249.         
  1250.         /***** Terminate the table **************************************/
  1251.         
  1252.         rcy = PrtGRxEndTable( prt);
  1253.  
  1254.     end
  1255.     else
  1256.         rcy = PrtGRxPrintLeft( prt, 'Helvetica Bold', 14, 'ERROR - Failed to create the table...');
  1257.  
  1258. return
  1259.  
  1260.