Você está na página 1de 34

Searching for tprinter in FiveWin 1.9.

2 - January 97 Hits: 24 28,079 Row(s) Searched in 1 Second(s) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Class tprinter Syntax: tprinter():New( <cDocument>, <lUser>, <lMeta>, <cModel> ) FiveWin provides a tprinter Class to manage the printer as an object, The PRINT command is building there a tprinter object. From that moment by the tprinter Class. calling the New() method of the tprinter() class. See Also: tprinter Commands Print.ch The Class tprinter has been fixed to provide a "FiveWin Report" default setup the printer. It has also been added as tprinter:Setup() method. * New Methods for tprinter Class: tprinter:SetLandscape() tprinter:SetPortrait() tprinter:SetCopies( nCopies ) // number of copies to generate * Enhancement: The constructor method ::New() of the Class tprinter Class tprinter Managing the Printer as an Object . tprinter Printer Class . Getprinter() Retrieves the printer device context without DlgBox . Getprinter() Retrieves the printer device context without DlgBox Syntax: Getprinter() --> <hDC> tprinter class to create a printer object without See also: Class tprinter See also: Class tprinter Sample: CLASS tprinter METHOD Say See Also: tprinter Print.ch

Class tprinter -------------------------------------------------------------------------------DATA -------------------------------------------------------------------------------hDC Handle of the Device Context of the Printer hDCOut Handle of the current metafile in use if file output specified aMeta Arrays of metafiles names generated in disk cDevice The name of the output device cDocument The name of the spooler document cDriver The name of the printer driver in use cModel Alternative printer to use cPort The name of the port used cDir The path for the metafiles storage. By default TEMP nPage The page currently printed nXOffset Coordinates of the virtual page origin nYOffset Coordinates of the virtual page origin lMeta If the output has to go to metafiles in disk lModified If the printer device handle should be initialized again lStarted If the printing already started oFont Default font to use for printing METHODS -------------------------------------------------------------------------------New Constructor from source code . End Destroys the current printer object . EndPage Ends the actual printed page. .

FillRect Fills a rectangle with a specified brush object. . Box Draws a box. . Cmtr2Pix Converts a centimeters coordinates into pixels coordinates . DraftMode Select the draft mode for speed up the printing . GetOrientation Retrieves the printer orientation. . GetPhySize Retrieves the paper physical dimensions . GetTextHeight Retrieves text Height for a specific font object . GetTextWidth Retrieves text Width for a specific font object . ImportWMF Imports a Windows metafile to be used as template . Inch2Pix Converts a inches coordinates into pixels coordinates . Line Draws a line. . nHorzRes Retrieves the horizontal resolution. . nHorzSize Retrieves the width of the physical dimensions . nLogPixelX Retrieves the number of pixels per logical inch . nLogPixelY Retrieves the number of pixels per logical inch . nVertRes Retrieves the height of the printer page in raster lines . nVertSize Retrieves the vertical dimensions in millimeters . Pix2Inch Converts pixels coordinates into inches coordinates . Pix2Mmtr Change from pixels to millimeters coordinates . Preview Make a preview of the print work . Rebuild Rebuilds all the associated handles and files of the printer ResetDC Updates the associated device handle of the printer object . Say Prints a text at a certain coordinates. . SayBitmap Prints a Bitmap. . SetAnisotropicMode Set the anisotropic mode. . SetCopies Set the number of copies to print. . SetHiInchMode Set the high inch mode. . SetHiMetricMode Set the high metric mode. . SetIsotropicMode Set the Isotropic mode. . SetLandscape Set the printer orientation to Landscape . SetLoInchMode Set the low inch mode. . SetLoMetricMode Set the low Metric mode. . SetPage Specifies the size of the paper to print on. . SetPixelMode Set the Pixel mode. . SetPortrait Set the printer orientation to Portrait . SetPos Set a new position on the page for next printing . SetSize Selects a different page dimensions . SetTwipsMode Each logical unit is converted to 1/20 of a point . SetFont Sets and retrieves the default printer font object . Setup Standard Setup DialogBox for printing . SetViewPortExt Sets the X and Y dimensions of the viewport . SetWindowExt Sets the X and Y extents of the printer device . StartPage Begins a new page . -------------------------------------------------------------------------------New Constructor from source code -------------------------------------------------------------------------------Syntax: Parameters: <cDocument> The name to assign to cDocument DATA, which it is the name of the spooler document to generate. <lUser> <lMeta> To let the user interactively select the printer to use. To PREVIEW the printout work. TPrinter():New( <cDocument>, <lUser>, <lMeta>, <cModel> ) --> Self

<cModel>

To select a different printer from the default one. It is the name of any printer installed in the system, (FiveWin PrintBegin() function generates this name from a partial name or from an index name). See Printer xBase Commands for a sample.

-------------------------------------------------------------------------------End Destroys the current printer object -------------------------------------------------------------------------------Syntax: <oPrn>:End()

This method should be used to release the current printer object and all its associated handles. It is the latest operation to perform with a printer object. Warning: The printer object does not destroy any related font you may have created. You must destroy the fonts you create for the printer: DEFINE FONT oFont NAME ... SIZE ... OF oPrn ... oFont:End() // Destroy the font

-------------------------------------------------------------------------------EndPage Ends the actual printed page. -------------------------------------------------------------------------------Syntax: <oPrn>:EndPage()

This method completes the current page. Once you do it, there is no way to perform any further printing on this same page.

-------------------------------------------------------------------------------FillRect Fills a rectangle with a specified brush object. -------------------------------------------------------------------------------Syntax: Parameters: <aRect> It is an array with the rectangle dimensions: { nTop, nLeft, nBottom, nRight } <oBrush> It is the brush object to use for filling the rectangle area. To create the brush use: DEFINE BRUSH oBrush ... -------------------------------------------------------------------------------Box Draws a box. -------------------------------------------------------------------------------Syntax: Parameters: <oPrn>:Box( <nTop>, <nLeft>, <nBottom>, <nRight>, <oPen> ) <oPrn>:FillRect( <aRect>, <oBrush> )

<nTop> <nLeft> <nBottom> <nRight> <oPen>

The coordinates of the box to draw. By default they are expressed in pixels, unless a different SetMapMode() mode is selected. It is an optional pen object to use for painting the box. To create it use: DEFINE PEN oPen STYLE ... COLOR ... WIDTH ...

Returns:

A logical value indicating if the operation was successfully performed.

-------------------------------------------------------------------------------Cmtr2Pix Converts a centimeters coordinates into pixels coordinates -------------------------------------------------------------------------------Syntax: Parameters: <nRow> <nCol> Returns: <aPoint> An array with the new point in pixel coordinates: { nTop, nLeft } The centimeters coordinates as numeric values. <oPrn>:Cmtr2Pix( <nRow>, <nCol> ) --> <aPoint>

-------------------------------------------------------------------------------DraftMode Select the draft mode for speed up the printing and testing -------------------------------------------------------------------------------Syntax: Parameters: <lOnOff> Returns: A logical value to turn on or off the draft mode. A numeric value indicating if the operation was successfully performed: Positive Negative The operation was successful It was not performed <oPrn>:DraftMode( <lOnOff> ) --> <nRetCode>

-------------------------------------------------------------------------------GetOrientation Retrieves the printer orientation. -------------------------------------------------------------------------------Syntax: <oPrn>:GetOrientation() --> <nOrientation>

Parameters: Returns:

None A numeric value indicating the orientation type: 1 2 Portrait LandScape

-------------------------------------------------------------------------------GetPhySize Retrieves the paper physical dimensions -------------------------------------------------------------------------------Syntax: Parameters: Returns: <oPrn>:GetPhySize() --> <aSize> None An array with the dimensions of the paper: { nWidth, nHeight } -------------------------------------------------------------------------------GetTextHeight Retrieves text Height for a specific font object -------------------------------------------------------------------------------Syntax: Parameters: <cText> <oFont> The text to retrieve its height. A font object. By default it uses the default font oFont of the printer object. To create it use: DEFINE FONT oFont NAME ... SIZE ... The height for that specified font. In fact, this height it is not depending on the text, but just on the font object. -------------------------------------------------------------------------------GetTextWidth Retrieves text Width for a specific font object -------------------------------------------------------------------------------Syntax: Parameters: <cText> <oFont> The text to retrieve its width. A font object. By default it uses the default font oFont of the printer object. To create it use: DEFINE FONT oFont NAME ... SIZE ... Returns: The width for that specified font. <oPrn>:GetTextWidth( <cText>, <oFont> ) --> <nWidth> Returns: <oPrn>:GetTextHeight( <cText>, <oFont> ) --> <nHeight>

-------------------------------------------------------------------------------ImportWMF Imports a Windows metafile to be used as template -------------------------------------------------------------------------------Syntax: <oPrn>:ImportWMF( <cFile>, <lPlaceable> ) --> nil

Parameters: <cFile> <lPlaceable> Comments: The name of the Windows metafile WMF file to use as a template for printing. If it is a placeable metafile. By default is .t. This new powerful FiveWin feature lets you use i.e.: Corel Draw to design a form, later you save it as a Windows metafile WMF file and use it from the FiveWin printer object. See SAMPLES\Corel.prg All the printed pages will show the metafile as their background, letting you place on it certain information. It is a very quick and easy way to design forms. -------------------------------------------------------------------------------Inch2Pix Converts a inches coordinates into pixels coordinates -------------------------------------------------------------------------------Syntax: Parameters: <nRow> <nCol> Returns: <aPoint> An array with the new point in pixel coordinates: { nTop, nLeft } The inches coordinates as numeric values. <oPrn>:Inch2Pix( <nRow>, <nCol> ) --> <aPoint>

-------------------------------------------------------------------------------Line Draws a line. -------------------------------------------------------------------------------Syntax: Parameters: <nTop> <nLeft> <nBottom> <nRight> <oPen> The coordinates of the line to draw. By default they are expressed in pixels, unless a different SetMapMode() mode is selected. It is an optional pen object to use for painting the box. To create it use: DEFINE PEN oPen STYLE ... COLOR ... WIDTH ... Returns: A logical value indicating if the operation was successfully performed. <oPrn>:Line( <nTop>, <nLeft>, <nBottom>, <nRight>, <oPen> ) --> <lSuccess>

-------------------------------------------------------------------------------nHorzRes Retrieves the horizontal resolution. -------------------------------------------------------------------------------Syntax: Parameters: Returns: <oPrn>:nHorzRes() --> <nHorzRes> None A numeric value indicating the horizontal resolution of the printer expressed in pixels.

-------------------------------------------------------------------------------nHorzSize Retrieves the width of the physical dimensions -------------------------------------------------------------------------------Syntax: Parameters: Returns: <oPrn>:nHorzSize() --> <nHorzSize> None A numeric value indicating the physical dimensions of the printer page expressed in millimeters.

-------------------------------------------------------------------------------nLogPixelX Retrieves the number of pixels per logical inch along the display width -------------------------------------------------------------------------------Syntax: Parameters: Returns: <oPrn>:nLogPixelX() --> <nPixels> None A numeric value indicating the number of pixels per logical inch along the display width.

-------------------------------------------------------------------------------nLogPixelY Retrieves the number of pixels per logical inch along the display height -------------------------------------------------------------------------------Syntax: Parameters: Returns: <oPrn>:nLogPixelY() --> <nPixels> None A numeric value indicating the number of pixels per logical inch along the display height.

-------------------------------------------------------------------------------nVertRes Retrieves the height of the printer page in raster lines -------------------------------------------------------------------------------Syntax: Parameters: <oPrn>:nVertRes() --> <nVertRes> None

Returns:

A numeric value indicating the vertical resolution of the printer in raster lines.

-------------------------------------------------------------------------------nVertSize Retrieves the vertical dimensions in millimeters -------------------------------------------------------------------------------Syntax: Parameters: Returns: <oPrn>:nVertSize() --> <nVertSize> None A numeric value indicating the vertical dimensions of the printer page in millimeters.

-------------------------------------------------------------------------------Pix2Inch Converts pixels coordinates into inches coordinates -------------------------------------------------------------------------------Syntax: Parameters: <nRow> <nCol> Returns: <aPoint> An array with the new point in inches coordinates: { nTop, nLeft } -------------------------------------------------------------------------------Pix2Mmtr Change from pixels to millimeters coordinates -------------------------------------------------------------------------------Syntax: Parameters: <nRow> <nCol> Returns: <aPoint> An array with the new point in millimeters coordinates: { nTop, nLeft } -------------------------------------------------------------------------------Preview Make a preview of the print work -------------------------------------------------------------------------------Syntax: Parameters: Returns: <oPrn>:Preview() None nil The pixels coordinates as numeric values. <oPrn>:Pix2Mmtr( <nRow>, <nCol> ) --> <aPoint> The pixels coordinates as numeric values. <oPrn>:Pix2Inch( <nRow>, <nCol> ) --> <aPoint>

Comments:

This method invokes the preview mode, which displays a window with a buttonbar, a visual page/s, to interactively let the user preview the print work and optionally to select what pages to finally send to the printer.

-------------------------------------------------------------------------------Rebuild Rebuilds all the associated handles and files of the printer -------------------------------------------------------------------------------Syntax: Parameters: Returns: Comments: <oPrn>:Rebuild() --> nil None Nothing Some printer methods require to rebuild the printer object to properly generate new handle values and also to reset the associated preview metafiles files array. FiveWin Printer object automatically invokes this method when it is required. -------------------------------------------------------------------------------ResetDC Updates the associated device handle of the printer object -------------------------------------------------------------------------------Syntax: Parameters: Returns: Comments: <oPrn>:ResetDC() --> <hNewDC> None The handle of the original device context with updated values. FiveWin Printer object automatically uses this method when an update of its device handle is required.

-------------------------------------------------------------------------------Say Prints a text at a certain coordinates. -------------------------------------------------------------------------------Syntax: Parameters: <nRow> <nCol> The coordinates where to display a text. They are graphical coordinates, and may be pixels, inches, millimeters, twips, etc... accordingly to the current SetMapMode() active on the device. Pixels are used by default. The text to display. An optional font object to use for printing. <oPrn>:Say( <nRow>, <nCol>, <cText>, <oFont>, <nWidth>, <nClrText>, <nBkMode>, <nPad> )

<cText> <oFont>

<nWidth> <nClrText> <nBkMode>

The total width of the text. By default it is the width of the text. An optional color to use for printing the text. A numeric value indicating how to mix the text with the background: 1 2 Transparent Opaque

<nPad>

A numeric value indicating how align the text to print: ( PAD_LEFT is used by default) #define PAD_LEFT #define PAD_RIGHT #define PAD_CENTER 0 1 2

-------------------------------------------------------------------------------SayBitmap Prints a Bitmap. -------------------------------------------------------------------------------Syntax: Parameters: <nRow> <nCol> <xBitmap> The start coordinates for the bitmap. By default they are expressed in pixels, unless a different SetMapMode() is used. A string with the name of the BMP file to print, if it exits, or the name of the bitmap resource or a numeric value with the resource identifier if the bitmap should be loaded from resources. The dimensions of the image to print. By default the original dimensions of the bitmap are used. An optional numeric value indicating the kind of raster operation to perform. Some of the possible values are: (to review all possible operations with bitmaps we strongly recommend a Graphics management Windows book) #define MERGEPAINT #define SRCAND 12255782 8913094 // 0xBB0226 <oPrn>:SayBitmap( <nRow>, <nCol>, <xBitmap>, <nWidth>, <nHeight>, <nRaster> ) --> nil

<nWidth> <nHeight> <nRaster>

-------------------------------------------------------------------------------SetAnisotropicMode Set the anisotropic mode. -------------------------------------------------------------------------------Syntax: Parameters: Returns: <oPrn>:SetAnisotropicMode() --> <nPrevMapMode> None A numeric value indicating the previous map mode if this operation was successful.

Comments:

Logical units are converted to arbitrary units with arbitrarily scaled axes. Setting the mapping mode to MM_ANISOTROPIC does not change the current window or viewport settings. To change the units, orientation, and scaling, an application should use the SetWindowExt and SetViewportExt functions.

-------------------------------------------------------------------------------SetCopies Set the number of copies to print. -------------------------------------------------------------------------------Syntax: Parameters: Returns: <oPrn>:SetCopies() None Nothing

-------------------------------------------------------------------------------SetHiInchMode Set the high inch mode. -------------------------------------------------------------------------------Syntax: Parameters: Returns: Comments: <oPrn>:SetHiInchMode() --> <nPrevMapMode> None A numeric value indicating the previous map mode if this operation was successful. Each logical unit is converted to 0.001 inch. Positive x is to the right; positive y is up.

-------------------------------------------------------------------------------SetHiMetricMode Set the high metric mode. -------------------------------------------------------------------------------Syntax: Parameters: Returns: Comments: <oPrn>:SetHiMetricMode() --> <nPrevMapMode> None A numeric value indicating the previous map mode if this operation was successful. Each logical unit is converted to 0.01 millimeter. Positive x is to the right; positive y is up.

-------------------------------------------------------------------------------SetIsotropicMode Set the Isotropic mode. -------------------------------------------------------------------------------Syntax: Parameters: Returns: Comments: <oPrn>:SetIsotropicMode() --> <nPrevMapMode> None A numeric value indicating the previous map mode if this operation was successful. Logical units are converted to arbitrary units with equally scaled axes; that is, one unit along the x-axis is equal to one unit along the y-axis. The SetWindowExt

and SetViewportExt functions must be used to specify the desired units and the orientation of the axes. GDI makes adjustments as necessary to ensure that the x and y units remain the same size. -------------------------------------------------------------------------------SetLandscape Set the printer orientation to Landscape -------------------------------------------------------------------------------Syntax: Parameters: Returns: <oPrn>:SetLandscape() None Nothing

-------------------------------------------------------------------------------SetLoInchMode Set the low inch mode. -------------------------------------------------------------------------------Syntax: Parameters: Returns: Comments: <oPrn>:SetLoInchMode() --> <nPrevMapMode> None A numeric value indicating the previous map mode if this operation was successful. Each logical unit is converted to 0.01 inch. Positive x is to the right; positive y is up.

-------------------------------------------------------------------------------SetLoMetricMode Set the low Metric mode. -------------------------------------------------------------------------------Syntax: Parameters: Returns: Comments: <oPrn>:SetLoMetricMode() --> <nPrevMapMode> None A numeric value indicating the previous map mode if this operation was successful. Each logical unit is converted to 0.1 millimeter. Positive x is to the right; positive y is up.

-------------------------------------------------------------------------------SetPage Specifies the size of the paper to print on. -------------------------------------------------------------------------------Syntax: Parameters: <nPageType> Specifies the size of the paper to print on. This method is superseed by SetSize( <nWidth>, <nHeight> ) method. 1 /* Letter 8 1/2 x 11 in /* Letter Small 8 1/2 x 11 in /* Tabloid 11 x 17 in <oPrn>:SetPage( <nPageType> ) --> nil

#define DMPAPER_LETTER */ */ #define DMPAPER_TABLOID

#define DMPAPER_LETTERSMALL 2 3

*/ #define DMPAPER_LEDGER */ #define DMPAPER_LEGAL */ #define DMPAPER_STATEMENT */ #define DMPAPER_EXECUTIVE */ #define DMPAPER_A3 */ #define DMPAPER_A4 */ #define DMPAPER_A4SMALL */ #define DMPAPER_A5 */ #define DMPAPER_B4 */ #define DMPAPER_B5 */ #define DMPAPER_FOLIO */ #define DMPAPER_QUARTO */ #define DMPAPER_10X14 */ #define DMPAPER_11X17 */ #define DMPAPER_NOTE */ #define DMPAPER_ENV_9 */ #define DMPAPER_ENV_10 */ #define DMPAPER_ENV_11 */ #define DMPAPER_ENV_12 */ #define DMPAPER_ENV_14 */ #define DMPAPER_CSHEET */ #define DMPAPER_DSHEET */ #define DMPAPER_ESHEET */ #define DMPAPER_ENV_DL */ #define DMPAPER_ENV_C5 */ #define DMPAPER_ENV_C3 */ #define DMPAPER_ENV_C4 */ #define DMPAPER_ENV_C6 */ #define DMPAPER_ENV_C65 */ #define DMPAPER_ENV_B4 33 /* Envelope B4 250 x 353 mm 32 /* Envelope C65 114 x 229 mm 31 /* Envelope C6 114 x 162 mm 30 /* Envelope C4 229 x 324 mm 29 /* Envelope C3 324 x 458 mm 28 /* Envelope C5 162 x 229 mm 27 /* Envelope DL 110 x 220mm 26 /* E size sheet 25 /* D size sheet 24 /* C size sheet 23 /* Envelope #14 5 x 11 1/2 22 /* Envelope #12 4 \276 x 11 21 /* Envelope #11 4 1/2 x 10 3/8 20 /* Envelope #10 4 1/8 x 9 1/2 19 /* Envelope #9 3 7/8 x 8 7/8 18 /* Note 8 1/2 x 11 in 17 /* 11x17 in 16 /* 10x14 in 15 /* Quarto 215 x 275 mm 14 /* Folio 8 1/2 x 13 in 13 /* B5 182 x 257 mm 12 /* B4 250 x 354 11 /* A5 148 x 210 mm 10 /* A4 Small 210 x 297 mm 9 /* A4 210 x 297 mm 8 /* A3 297 x 420 mm 7 /* Executive 7 1/4 x 10 1/2 in 6 /* Statement 5 1/2 x 8 1/2 in 5 /* Legal 8 1/2 x 14 in 4 /* Ledger 17 x 11 in

*/ #define DMPAPER_ENV_B5 */ #define DMPAPER_ENV_B6 */ #define DMPAPER_ENV_ITALY */ #define DMPAPER_ENV_MONARCH 37 */ #define DMPAPER_ENV_PERSONAL 38 */ #define DMPAPER_FANFOLD_US 39 */ #define DMPAPER_FANFOLD_STD_GERMAN 40 /* German Std Fanfold 8 1/2 x 12 in */ #define DMPAPER_FANFOLD_LGL_GERMAN 41 /* German Legal Fanfold 8 1/2 x 13 in */ #define DMPAPER_LAST #define DMPAPER_USER Returns: nil. DMPAPER_FANFOLD_LGL_GERMAN 256 /* US Std Fanfold 14 7/8 x 11 in /* 6 3/4 Envelope 3 5/8 x 6 1/2 in /* Envelope Monarch 3.875 x 7.5 in 36 /* Envelope 110 x 230 mm 35 /* Envelope B6 176 x 125 mm 34 /* Envelope B5 176 x 250 mm

-------------------------------------------------------------------------------SetPixelMode Set the Pixel mode. -------------------------------------------------------------------------------Syntax: Parameters: Returns: Comments: <oPrn>:SetPixelMode() --> <nPrevMapMode> None A numeric value indicating the previous map mode if this operation was successful. Each logical unit is converted to one device pixel. Positive x is to the right; positive y is down.

-------------------------------------------------------------------------------SetPortrait Set the printer orientation to Portrait -------------------------------------------------------------------------------Syntax: Parameters: Returns: <oPrn>:SetPortrait() None Nothing

-------------------------------------------------------------------------------SetPos Set a new position on the page for next printing -------------------------------------------------------------------------------Syntax: Parameters: <nRow> The coordinates of the new position. By default they <oPrn>:SetPos( <nRow>, <nCol> ) --> <nLPrevPos>

<nCol> Returns:

are expressed in pixels, unless another mode (SetMapMode()) is being used. A numeric long value containing the previous device selected position: <nPrevRow> = nLoWord( <nLPrevPos> ) <nPrevCol> = nHiWord( <nLPrevPos> )

-------------------------------------------------------------------------------SetSize Selects a different page dimensions -------------------------------------------------------------------------------Syntax: Parameters: <nWidth> <nHeight> Returns: The new dimensions for the printer page in tenths of millimeters. nothing <oPrn>:SetSize( <nWidth>, <nHeight> ) --> nil

-------------------------------------------------------------------------------SetTwipsMode Each logical unit is converted to 1/20 of a point -------------------------------------------------------------------------------Syntax: Parameters: Returns: Comments: <oPrn>:SetTwipsMode() --> <nPrevMapMode> None A numeric value indicating the previous map mode if this operation was successful. Each logical unit is converted to 1/20 of a point. (Because a point is 1/72 inch, a twip is 1/1440 inch). Positive x is to the right; positive y is up.

-------------------------------------------------------------------------------SetFont Sets and retrieves the default printer font object -------------------------------------------------------------------------------Syntax: Parameters: <oNewFont> Is the new font object to set as the printer default one. To create it use: DEFINE FONT oFont NAME ... SIZE ... Returns: <oFont> The default font object associated to the printer. <oPrn>:SetFont( <oNewFont> ) --> <oFont>

--------------------------------------------------------------------------------

Setup Standard Setup DialogBox for printing -------------------------------------------------------------------------------Syntax: Parameters: Returns: <oPrn>:Setup() --> nil None Nothing

-------------------------------------------------------------------------------SetViewPortExt Sets the X and Y dimensions of the viewport -------------------------------------------------------------------------------Syntax: Parameters: <nXExtent> <nYExtent> Returns: Specifies the new X-extent and Y-extent, in device units of the viewport. The return value is the previous viewport extents, in device units, if the function is successful. The low-order word contains the previous x-extent; the high-order word contains the previous y-extent. Otherwise, the return value is zero: <nPrevXExtent> = nLoWord( <nPrevViewPortExt> ) <nPrevYExtent> = nHiWord( <nPrevViewPortExt> ) -------------------------------------------------------------------------------SetWindowExt Sets the X and Y extents of the printer device -------------------------------------------------------------------------------Syntax: Parameters: Returns: <oPrn>:SetWindowExt( <nWidth>, <nHeight> ) --> <nPrevWindowExt> Specifies the new X-extent and Y-extent, in logical units, of the device context of the printer. The return value is the previous device extension, in logical units, if the function is successful. The low-order word contains the previous x-extent; the high-order word contains the previous y-extent. Otherwise, the return value is zero: <nPrevXExtent> = nLoWord( <nPrevWindowExt> ) <nPrevYExtent> = nHiWord( <nPrevWindowExt> ) -------------------------------------------------------------------------------StartPage Begins a new page -------------------------------------------------------------------------------Syntax: <oPrn>:StartPage() <oPrn>:SetViewPortExt( <nXExtent>, <nYExtent> ) --> <nPrevViewPortExt>

StartPage starts a new page. From that moment on you may perform any printing action on the printer object, like :Say(), :Box(), :Line(), etc...

You may print at any coordinate of the page. Once you have completed the page, an :EndPage() should be done. -------------------------------------------------------------------------------Syntax: tprinter():New( <cDocument>, <lUser>, <lMeta>, <cModel> ) -------------------------------------------------------------------------------New Constructor from source code -------------------------------------------------------------------------------Syntax: Parameters: <cDocument> The name to assign to cDocument DATA, which it is the name of the spooler document to generate. <lUser> <lMeta> <cModel> To let the user interactively select the printer to use. To PREVIEW the printout work. To select a different printer from the default one. It is the name of any printer installed in the system, (FiveWin PrintBegin() function generates this name from a partial name or from an index name). See Printer xBase Commands for a sample. tprinter():New( <cDocument>, <lUser>, <lMeta>, <cModel> ) --> Self

-------------------------------------------------------------------------------Managing the printer as an object -------------------------------------------------------------------------------FiveWin manages the printer as an object, so controlling the printing process is as easy as manipulating, from an object oriented point of view, the printer object. * How to create a Printer object ? FiveWin provides a tprinter Class to manage the printer as an object, and some specific xBase commands to easier much more that manipulation: PRINT oPrn NAME "My Printout" PREVIEW PAGE ... oPrn:Say( nRow, nCol, cText, ... ) ... ENDPAGE ENDPRINT The PRINT command is building there a tprinter object. From that moment on we may manipulate it directly, using all the DATA and METHODs offered by the tprinter Class. * How to manipulate the Printer Object ?

Normally you create several pages using the commands: PAGE ... ENDPAGE And from inside that section you send messages to the Printer object. The most common message used is <oPrn>:Say() : oPrn:Say( nRow, nCol, cText, ... ) Remember that the coordinates where you are printing depend upon the specific printer resolution you may be using. In order to control this, you have to ask the printer object about its specific resolution: oPrn:nVertRes() is the number of pixels in vertical oPrn:nHorzRes() is the number of pixels in horizontal Now, you divide those values by the number of rows and cols that you want to manage, and increase nRow, nCol according to those steps. See SAMPLES\TestPrn2.prg * How to define a font that adapts to a specific Printer Object ? To create a font object that adapts its size to the specific resolution of a printer, we use as always the container clause OF : local oPrn, oFont PRINT oPrn DEFINE FONT oFont NAME "Arial" SIZE 0, -10 OF oPrn ... PAGE ... oPrn:Say( nRow, nCol, cText, oFont, ... ) ... ENDPAGE ENDPRINT oFont:End() Remember to destroy the font once you have finished printing.

-------------------------------------------------------------------------------METHOD Print( )CLASS TWindow -------------------------------------------------------------------------------TWindow::Print( <oPrint>, <nRow>, <nCol>, <nZoom> ) --> Parameters: <oPrint> A printer object created by either DEFINE PRINTER or by calling the New() method of the tprinter() class.

<nRow> <nCol> <nZoom>

The pixel row on the paper where the printing of the contents should start. The pixel column on the paper where the printing of the contents should start. The enlargement factor that will be used when printing. It must be an integer value ( >= 1).

Function: This method will send the contents of the window to a printer object so that it will be printed.The printer is represented by the printer object <oPrint> which should be a valid printer object. The scaling of the picture on the paper can be controlled by <nZoom>. -------------------------------------------------------------------------------Listings Doing print lists and reports -------------------------------------------------------------------------------Building a list in Windows is just a little more sophisticated task than in DOS, mainly because we are working in a graphical environment. This means that we may want to mix graphics and text and also that the text can use different kinds of fonts. This creates a new kind of sophistication. We are working on the idea of making lists as easy as doing SET DEVICE TO..., but in this first release it is not completely ready (but as you will see in a moment it is extremely easy): We have created a Printer Object, which automatically controls all the printing processes. To create it you do: PRINT <ObjectName> [ NAME <ReportName> ] and finish with it: ENDPRINT <ObjectName> is the Object that automatically gets created. The NAME clause is the name Windows will show in the Windows standard printing spooler. Now, to start printing a page you do: PAGE and to end: ENDPAGE As soon as you create the Printer Object the standard Windows Dialog Box will appear letting you select the different print configurations. You may use as many fonts as you wish. To do this you have to create some FONT objects: DEFINE FONT fntArial NAME "Arial" SIZE 40, 20 ... After printing you have to destroy them:

RELEASE FONT fntArial Here you have a complete example: function MakesList( oLbx ) // oLbx is a TWBrowse which you want to // repaint after listing...

local oPrn, fntArial local nRow := 1, nRec := Recno() GO TOP DEFINE FONT fntArial NAME "Arial" SIZE 40, 60 PRINT oPrn NAME "Clients" // Name the List Box Generated

PAGE while ! EoF() oPrn:Say( nRow, 1, Clients->Name, fntArial ) nRow += fntArial:nHeight if nRow > 50 * fntArial:nHeight nRow = 1 ENDPAGE PAGE endif SKIP end ENDPAGE ENDPRINT GOTO nRec RELEASE FONT fntArial return As we suggested in other areas of this part of the guide, take a look at the examples supplied with FiveWin in order to get a better idea of how to make the print object work for you. -------------------------------------------------------------------------------FiveWin 1.9.2 =========== * New Ole Automation client support: New functions CreateOleObject(), OleInvoke() and OleSetProperty(). See SAMPLES\TestOle.prg. The perfect Microsoft Office-FiveWin intregation. * New Office 97 look: Try the new NOBORDER clause for the ButtonBar buttons. See SAMPLES\FwBorl.prg buttonbar! * The ATI video card bug has been fixed!!! Finally we discovered the ATI offending code and we fixed it! * InterNet support: New Class TSocket provides FiveWin all the powerfull // // // // N. of lines x Character height You have to calculate the number of lines you may use with a certain font

TCP/IP WinSock support. See SAMPLES\TestSock.prg for an impressive demo of a fully operative WEB server entirely written with Clipper & FiveWin. Once you have TCP/IP installed on your machine, start TestSock.exe and press button start. The message bar will report your IP own address when you move the mouse over the main screen. Then, start Microsoft IExplore.exe and you will be impressed watching your app working as a real and self-contained WEB pages InterNet server. With these unique features, you may build the most powerfull IntraNet/InterNet applications. * Fix: Thanks God we found the NetApi.dll bug when printing under Windows 3.1 for WorkGroups and using a remote printer. It was as simple as specifying a NAME for the print document: PRINT <oPrn> NAME "WhatEver" The Class tprinter has been fixed to provide a "FiveWin Report" default name. It has been tested and no more NetApi.dll GPFs! <g> * Fix: There was a wrong behavior when using BackSpace on a Get. It has been fixed. * Enhancements on the FiveWin IDEs: Lately we decided that FiveWin should include two IDEs: the 'traditional' one (on the line of C++ IDEs) and a 'Visual' one (on the line of VB, Delphi). We will try to get them closer and closer as mush as possible (in fact we would like to have just one IDE which may works as 'traditional' or as 'visual'). We have done recent work on the traditional IDE (IDE directory) and now it is already possible to edit, compile and link from it. Projects are still not supported, but soon will be implemented. Be sure that the TOOLS directory is available and that your paths are properly set at the LNK files. Soon all this setup will be automatically managed. * Enhancement: Class TVbxControl were not properly managing array properties. Now it is working ok! We have defined a new class TVbxArray that it is automatically managed by VBX controls. See SAMPLES\ChartFX2 for a superb VBX graphics demo!!! * Enhancement: Class TReport has been enhanced so now all codeblocks automatically receives Self as the first parameter. The Report groups receive the group object instead of the report object (the group object keeps a reference to the report object at DATA oReport). * Very important: Clipper 5.2 has a bug at Alloc.obj module. This bug is fixed at Clipper 5.3. In case you are not still using Clipper 5.3, please extract Alloc.obj from Clipper 5.3 Clipper.lib and linking in your application. This solves many DBF management potential errors. These problems normally will only manifest on very large applications. From Clipper 5.3 do: LIB Clipper.lib * Alloc.obj;

And use it at your LNK file: FI Alloc.obj We do recommend to use Clipper 5.3. It is a better Clipper. Based on our own tests, Clipper 5.3 MDX and CDX support it is working ok. * Very important: FiveWin.lib keeps growing and we are very close to the LIB size limit. We are still resisting to split the library into two: FiveXX.lib (for PRGs) and FiveC.lib for C language code. But for now,

if you keep replacing your own modules at FiveWin.lib you could reach a critic LIB size. How do you know if there is a problem there ? If you try to execute your application and you get an error saying "one of the devices related to the application is not found" under Windows 95. This means that the EXE is corrupted caused by the LIB size. The solution is to use your own LIB for your modules or modifications on FiveWin modules. Don't modify FiveWin.lib. * New: There is a new method EditCol() for Class TWBrowse that lets you do non-modal editing on a browse. Remember that the actual lEditCol() method of Class TWBrowse is modal, so you can not click outside the bounds of the Get to switch to an adjacent cell. * New: clause WHEN for MenuItems !!! This really saves a lot of coding to automatically activate and deactivate MenuItems. Also, the clause BREAK has been implemented: very usefull when managing very large popups that now can be broken in several vertical sections. * New: Standard Editing capabilities. The METHOD AddEdit() of the Class TMenu implements standard editing capabilities to your app (following the Microsoft interface tendencies). This means that you can perform a UnDo, ReDo, Cut, Copy, Paste, Find, FindNext, Replace, Delete, SelectAll and Properties to any element of your interface. Just define the codeblocks: bUnDo, bReDo, bCut, bCopy, bPaste, bFind, bFindnext, bReplace, bProperties and FiveWin will automatically route those requests to the control that currently is focused. These methods have been added to TWindow (and all inherited classes), TMdiFrame and TMdiChild. * New: 32 bits API support!!! FiveWin lets you easily access the Windows 95 and Windows NT 32 bits DLLs. See SAMPLES\ Test32.prg for a working demo. It is as easy as use a new DLL32 clause when accessing run-time DLLs. You can also LoadLib32() and FreeLib32(). Our next target is to be able to start a FiveWin application as a real 32 bits app. * New: The source code of the FiveWin debugger has been published. We will be happy to review all your suggestions and enhancements to have a much better and usefull debugger. See FUNCTION\ FWDGBP.prg !!! * New: The FiveWin ErrorSys DialogBox has been modified to give it a more modern look. Generate any Clipper error and have a look <g>. * Enhancement: Class TComboBox has been enhanced to get a better DropDown (including a GET!) use. See Samples\ DropDown.prg sample. Thanks a lot to Jerry Shaw for his great help! Warning: Previous versions of FiveWin required to redefine the contained oGet of a dropdown ComboBox. Now this is no longer required. * Enhancement: RADIOS now accept different Help IDs for each element. See SAMPLES TestRad2.prg. * Important Enhancement: Class TDataBase has been greatly enhanced, and all its C source code has been removed. We received a lot of request from FiveWin users to have full access to its source, so we decided to code it in standard Clipper. Class TWorkArea no longer exists. In fact, the new Class TDataBase now contains all the older TWorkArea

Class functionality. Class TDataBase now automatically work on a NetWork, issuing the locks and unlocks as required. It is a very powerfull class we strongly recommend you to use. See the documentation for an indeep explanation and recommendations about its use. * New: Clipper KEYBOARD command and __Keyboard() function are already available! Also Clipper LastKey(). You must give the focus to a control or windows prior to send it some keystrokes. Control keys are not supported yet. See SAMPLES TestKey.prg * New: Clipper Alert() function is supported as in MsDos. See SOURCE FUNCTION Alert.prg and SAMPLES Alert.prg. Syntax: Alert( <cMsg>, <acOptions> [,<cTitle>] ) --> nSelectedOption * Enhancement: Class TFolder. Folders may be now created from source code. See SAMPLES TestFld3.prg and SAMPLES GenFold.prg. * New: Class TWBrowse admits now to use different colors for painting each browse row, based on a codeblock. You can have great looking browses with a minimum work on your side. See SAMPLES FwBrow.prg for a working demo. * New: We are using CTL3DV2.DLL instead of older CTL3D.DLL. There is no code change required in your apps, just be sure to supply your customers CTL3DV2.DLL instead of CTL3D.DLL. CTL3DV2.DLL must be copied to your WINDOWS/SYSTEM directory or it will not be found by your app. * New: We have adapted FiveWin colors to use the Windows current colors. * New: Class TPages, it lets you manage multiple DialogBox pages in the same way as folders. See SAMPLES TestPage.prg for a working sample. * Very important: NEVER mix Clipper 5.3 and previous Clipper versions code if you are using a previous Blinker version to 3.2. To mix Clipper 5.x and Clipper 5.3 code you MUST use Blinker 3.2. No problem if you use Microsoft Link or Symantec OptLink. * New: Much improved FiveWin DGROUP consume. We have reduced almost entirely the DATA segment used by FiveWin. We needed this because Blinker does not compress Clipper symbol tables over 64 Ks. So, in very large apps (around 2 megas) Blinker stops doing it and suddenly the app consumes more DGROUP, so we needed to control this. Our tests here are going 100% OK! * New LoadAccelerators() function. * Improved MAPI support, perfect for quick sending NET documents from your app, just calling MAPISendDocument(). See SAMPLES FivEdit.prg. * Improved Network connection and disconnection functions, for easily access all Network resources from inside your app: WNetConnectDialog() and WNetDisconnect(). Users will not need to access FileManager or Explorer to connect on the Network. See SAMPLES FivEdit.prg. * New support function for Placeable MetaFiles (now you can use Corel Draw or similars to generate MetaFiles that could be used from your apps. Perfect for invoices, bills, and general free-forms printing techniques). See SAMPLES Corel.prg.

* New Multimedia SndPlayRes() function to reproduce WAV files from resources (no external WAV files required). * New automatic Alignment capabilities. Controls automatically adjust their positions in screen. This save hours of work! New DATAs: oTop, oLeft, oBottom, oRight and oClient and a new TPanel Class to place auto-alignment controls inside other controls! See SAMPLES TestAlig.prg. * Much improved DDEML support. There is a new Class TDDEML which easily automatizes it. See SAMPLES DDEMLSvr.prg and DDEMLCli.prg. * New nRandom() function for easily generating random numbers in your apps. * New powerfull hashing function to incredible quickly access your huge-arrays elements. nStrHash(). See SAMPLES TestHash.prg. * New: See Class TTxtEdit. It is a powerfull and 100% configurable, text editor with syntax color highlighting. See SAMPLES FivEdit.prg. * New: SET MULTIPLE ON command, permits to run multiple instances of the same FiveWin EXE. Use this to let your users run your app multiple times at once. Important: ONLY FOR Windows 3.1. Not for Windows 95 and NT. * Important: Clipper 5.3 users: ExoSpace.lib is no longer required when linking your applications. Also, NtxPos() has been updated to properly work with CA-Clipper 5.3. * New security functions: nStrCRC() to get the checksum of a text and nFileCRC() to get the checksum of an entire file. This is the perfect way to ensure that your final EXE is not modified at all! See SAMPLES TestCRC.prg * New ListBox METHODs: SwapUp() and SwapDown(). They let you move up and down a listbox item. * New nSerialHD() function to retrieve the harddisk serial number. Many people were requesting this to copy-protect applications. See SAMPLES TestHard.prg. * Bug Fixed: Methods oReport:PhyWidth() and oReport:PhyHeight() did not work correctly because the non-printeable area was excluded from the widht and height, if you need the printeable area use the method nHorzSize() and nVertSize() of the printer object. * Bug Fixed: oPrn:SetLandScape() * Bug Fixed: oPrn:SetPortrait() * Bug Fixed: oPrn:SetCopies( nCopies ) * New!!!: New clause on the PRINT command: PRINTER oPrn TO "HP" PRINTER oPrn TO "EPSON" PRINTER oPrn TO "FAX" Now you can choose any printer just indicating part of his name when you defined them in the Windows control panel

PRINTER oPrn TO 2 You can also choose the printer indicating his ordinal number on the printer list. (Remember to copy the new PRINT.CH to your INCLUDE directory) * New: New method oPrinter:GetOrientation() that gives you the current orientation of the printer: #define PORTRAIT #define LANDSCAPE 1 2

* New: New method oPrinter:SetSize(nWidth, nHeight) on the the printer object to change the dimension of the page (in milimiters) * New: New method oPrinter:GetPhySize(@nWidth, @nHeight) on the the printer object to find the physical size of the page. Yoy may pass by reference the variables wich hold the data but also the method returns a two-dimension array with the data as well. * New: New methods to do some conversions with the printer object: Pix2Mmtr(nRow, Pix2Inch(nRow, Cmtr2Pix(nRow, Inch2Pix(nRow, nCol) nCol) nCol) nCol)

Yoy may pass by reference the variables wich hold the data but also the methods returns a two-dimension array with the data as well. * Bug Fixed: Methods SayBitmap(), Box() and Line() did not work properly, now it is ok. * Bug Fixed: The PREVIEW clause did not work and the report was always sent to the printer (Bug in FW 1.8e) * New: New version of PREVIEW.DLL that includes all the printing messages for the report engine and the preview program. You should update the version of PREVIEW.DLL wich is on your WINDOWS SYSTEM with the new one located at CLIPPER5 FWXX SAMPLES REPORT. You will se PREVIEW.DLL if you want PREVIEW.DLL at least two DLL's at the .. SAMPLES REPORT directory, wich is en english and PREVSP.DLL wich is in spanish, to use the spanish version just rename PREVSP.DLL to on your WINDOWS SYSTEM directory.

This tecnique will make it possible to have a Preview multi-language, just use the WorkShop to change all the messages to your own language. * New: Method SetTxtColor(nColor, nFont) to change the color of nFont For example: oReport:SetTxtColor(CLR_RED, 1) will change the default color to Red * New: Method SetShdColor(nColor) to change the color of the shadow when the clause SHADOW is used on any column. * New: Method SetPenColor(nColor) to change the color of the pen used

for horizontal lines. To change the color of vertical lines just indicate the color when you create the pen, for example: DEFINE PEN oPen WIDTH 1 COLOR CLR_RED * New: Method CellView() on class TReport to give to you report a Spread Sheet style (It also works with the clause TO FILE ...) * New: Data lJoin on class TReport to join all the lines in your report (It also works with the clause TO FILE ...) * New: Data lSeparator on class TReport to draw a separator line between all the records of your report (It also works with the clause TO FILE ...) * New: Data Cargo on all the Report engine classes * New: Data nOrder on TRGroup and TRColumn that holds the relative order creation of the object, for example, the second column of your report will have nOrder == 2 * New: Data lSeparator on TRColumn when .T. the column will have a separator line. * New: Data lDobleSep on TRColumn when .T. and if the data lSeparator is .T. the separator line will have two lines. * New: Data lTextSep on TRColumn when .T. and if the data lSeparator is .T. the separator line will have the width of the text printed, if not the width of the separator line will be the same as the column. For example if you want the first column of your report to have a double underline, do the following: oReport:aColumns[1l:lSeparator := .T. oReport:aColumns[1l:lDobleSep := .T. oReport:aColumns[1]:lTextSep := .T. * New: Method Separator() on TRColumn to print separator lines on any column manually. The method Separator() receives the following parameters: lTextSep lDoblSep nLine nRow : : : : if .T. the separator Width will be the same as the DATA if .T. the separator line will have two lines Line number of the DATA column Row number to start printing the separator line

For example: Put the salary doble underline when is greater than 100 REPORT oReport .... .... COLUMN DATA Db->Name, Db->Salary ; TITLE "Name", "Salary" ACTIVATE REPORT oReport ON CHANGE ChkSalary(oReport) .... .... FUNCTION ChkSalary(oReport)

IF Db->Salary > 100 oReport:aColumns[1]:Separator(.T., .T., 2) ENDIF RETURN NIL -------------------------------------------------------------------------------FiveWin 1.7 d ============= * Enhancement: FiveWin TRtfFile Class -for creating Windows help files!- has been enhanced to accept characters with ascii over 127 ! This was producing errors when trying to create a .HLP file from the FiveWin IDE. Try those extended characters now. It is ok! Thanks to Angel Enrique Iglesias! * New: Function PrinterSetup() that shows the Windows standard dialog box to setup the printer. It has also been added as tprinter:Setup() method. * Sorry! The debugger was not working (a very little error <g>) in 1.7 c. Fixed! Sorry for the new download. Thanks, * The FiveWin Norton Guide is now over 1.1 Mega size (ufff, FiveWin is really big!). There is a lot of new documentation and more is coming soon. Thanks to all of you that have been waiting for it. We promised you we are going to offer the best documentation, and be sure we will do it! * Enhancement: TCheckBox class has been modified to default initialize associated logical variable when it is nil. Our wish is that in no circunstance FiveWin may generate an error even if it is not been used properly! * ODBC: Has been greatly enhanced! We are in contact with some companies that are working really hard to help us fine tunning FiveWin ODBC. There are very nice new tricks that really speed up a lot ODBC processes (like automatically generating DBFs from ODBC SQL queries). Thanks a lot to Jesus Iniesta from Caja Madrid! See the new SAMPLE ODBC01.prg developed by Jesus Iniesta. And much more is coming soon! * Enhancement: GETs with password detection. TGet class has a new DATA ::lPassword. You may set it to .t. or just specify PASSWORD style from inside your resource editor. Thanks to our dear Ignacio Ortiz de Zu.iga. * New functions MsgRun() and MsgWait(): MsgRun() executes a codeblock and waits for its return before continuing. MsgRun( <cCaption>, <cTitle>, <bAction> ) MsgWait() is a modification on the above, and is specifically for showing waiting messages. MsgWait( <cCaption>, <cTitle>, <nSeconds> ) See SAMPLES TestMsg.prg for a working sample. * FiveWin VBX support has been enhanced, and now it is not needed to especify VBX clause when defining a DialogBox that it is going to use VBX controls. See SAMPLES TestVbx4.prg.

-------------------------------------------------------------------------------FiveWin 1.7 - PreRelease IV ============================= * New!!!: We have already added support for Windows MAPI : Mail Services. See TestMail.prg for a sample. Now you may take advantage of NetWork mail system in Windows which it is really powerfull. * VBXs support!!! Yes, we already manage Visual Basic VBXs files. See TestVbx_.prg for several samples. Probably this is the most important enhancement we have done lately to FiveWin! See documentation for a full explanation and use guides. * There was a missing METHOD in TMultiGet Class: METHOD HScroll( nWParam, nLParam ) VIRTUAL So, MultiLine Gets were not working properly when using an horizontal scrollbar. Now it is ok! See TestMemo.prg for a full working sample, * New Methods for tprinter Class: tprinter:SetLandscape() tprinter:SetPortrait() tprinter:SetCopies( nCopies )

// number of copies to generate

to automatically select printer orientation from source code, without showing the DialogBox. See SAMPLES TestPrn1.prg for a working sample. * Bug fixed: The new resources control system implemented in FiveWin had a problem that only was activated when generating a lot of Dialog Boxes (several hundreds). It has been fixed and now it works perfect! * Enhancement: We have adapted FiveWin ListBox controls to work also with numeric values. This means that now you may also do: local nValue := 2 REDEFINE LISTBOX nValue ITEMS { "One", "Two", "Three", "Four" } ; ID ... OF oDlg ... And nValue will keep the ListBox selected position. Remember: ListBoxes now are usefull for managing string and numeric variables. We plan to do this also to ComboBoxes. * Enhancements: Ignacio Ortiz has been working improving Report Engine speed (it was already fast, but now it is... incredible!). Also he has done very nice improvements on drawing lines, focus control, and more things... Thanks Ignacio! Simply fantastic! * Enhancements: Error.log information has been increased. Now we tell you all the other active tasks and their names! We keep looking for

a way to detect if double space is working -please let us know if you discover it!- We want to offer a really powerfull error.log info. * Enhancements: MDIChild windows now accept all kind of user defined styles. You may have MDIChilds with no maximize button, no border, etc... See TestMDI5.prg for a working sample. * New: Background process management! Now FiveWin offers you the possibility of controlling idle periods. Don't confuse idle actions with timers. Idle actions get processed when _there_is_nothing_ else to process. Modal dialog boxes don't produce Idle periods. See TestIdle.prg for a working sample. * Error.log information has been enhanced: Now we include all the parameters and local variables available to all active procedures and functions. You will find this very helpfull when trying to detect an error. * ButtonBar has been enhanced. Now you can specify TOP, LEFT, RIGHT or BOTTOM and the ButtonBar will show at that side. Also, if you click the right button of the mouse on it, it will appear a popup to manually select the new position. -------------------------------------------------------------------------------Classes Hierarchy The relationship between Classes ------------------------------------------------------------------------------TcColumn Browse columns (for TCBrowse objects) . TDDE TDDEMLServer TDDEMLClient TFile | |--|--|--+--TFont TWindow | |--| |--| |--|--|--| |--| +--Dynamic Data Exchange based on Win 3.0 . Windows 3.1 DDEML Server management Windows 3.1 DDEML Client management Low level files management as objects TLex TLibFile TTxtFile TObjFile FiveWin lexical analyzer LIB files management Ascii text files management OBJs intel binary files management Font Class Window base Class TDialog TBar TMdiFrame TMdiClient TMdiChild TMsgBar TControl | |--- TBitmap |--- TButton |--- TCheckBox |--- TComboBox Dialog Boxes Button bar MDI support MDI support MDI support Messages bar Base Class for controls Pictures in Bitmaps PushButtons Logical checkboxes Get + ListBox functionality . . . . . . . . . . . . . . . . . . . .

|--|--|--|--|--|--|--|--|--|--|--+---

TFolder TGet TIcon TListBox TMeter TMultiGet TPages TRadio TScrollBar TTabs TVbX TWBrowse | +--- TCBrowse

FiveWin Folders Typical Clipper GET Icons as controls ListBox selection list Meter controls Gets for Memo editing Multiple DialogBox pages management Radio controls ScrollBars controls FiveWin Tabs Visual Basic controls Browse controls Browse with column objects Linked-Lists data structures (Trees) TreeItems Class (used by trees) Menu Class Menu MenuItems FiveWin disk-storable codeblocks Media Control interface AVI Video controls Radio Controls Menu ODBC Sessions management ODBC each DataBase managed Pen Class Printer Class Report Report Report Report engine columns Groups single line

. . . . . . . . . . . .

TLinkList TTreeItem TMenu TMenuItem TBlock TMCI +--- TVideo TRadMenu TOdbc TDbOdbc TPen tprinter TReport TrColumn TrGroup TrLine . TTime TTimer TDataBase

. . . . . . . . . . . . . . . . . . .

Time Class Timer Class DataBase Class

-------------------------------------------------------------------------------Getprinter() Retrieves the printer device context without DlgBox -------------------------------------------------------------------------------Syntax: Parameters: Returns: <hDC> The handle of the device context for the system printer. This system printer is the printer that is installed in Windows as the default priner. Getprinter() --> <hDC> None

Observations:

This function is automatically called from the tprinter class to create a printer object without prompting with the standard printing selection DialogBox. SOURCE\\WINAPI\\PrintDc.c Class tprinter

Source code: See also:

-------------------------------------------------------------------------------StartDoc() Start generating a new printing document -------------------------------------------------------------------------------Syntax: Parameters: <hDC> Returns: <nRetCode> The return value is positive if the function is successful. Otherwise it is SP_ERROR. #define SP_ERROR Source code: See also: (-1) Identifies the device context for the print job. StartDoc( <hDC> ) --> <nRetCode>

SOURCE\\WINAPI\\PrintDC.c Class tprinter

-------------------------------------------------------------------------------TextOut() Draws text to a specified location -------------------------------------------------------------------------------Syntax: Parameters: <hDC> <nRow>, <nCol> <cText> Returns: <lSuccess> Sample: Source code: See also: A logical value indicating that the operation was completed successfully. CLASS tprinter METHOD Say SOURCE\\WINAPI\\Text.c ExtTextOut() WSay() Identifies the device context. The coordinates where to print. The text to be drawn. TextOut( <hDC>, <nRow>, <nCol>, <cText> ) --> <lSuccess>

-------------------------------------------------------------------------------Printing Commands -------------------------------------------------------------------------------Using the Printer PRINT [ <oPrint> ] ; [ TITLE | NAME | DOC <cDocument> ] ; [ FROM USER ] ; [ PREVIEW ] [ TO <xModel> ] PAGE <oPrint>:Say( <nRow>, <nCol>, <cText>,; [<oFont>], [<nWidth>],; [<nClrText>] ) ... ENDPAGE ENDPRINT <oPrint> <cDocument> <nRow>, <nCol> A reference to the Printer Object. The name of the document to be generated. It is the name that appears at the Spooler. The starting coordinates of the print measured in printer resolution units. This means that different printers will generate different looking reports. In order to avoid this (you want the same looking printout with different printers!) you need first to calculate the resolution of the printer, and then, divide those dimensions by the number of rows and columns that you want: See SAMPLES\TestPrn2.prg <cText> <oFont> The value to print. It may be of any type. FiveWin will automatically convert it into a string expression. A font object to use when printing the <cText> value. See the FONT xBase commands to properly build a font. It is an optional parameter. Important: If you want a specific dimension for that font independently from the printer used, you must specify the OF ... clause when creating the font, and after the printer object has been created: local oPrn, oFont PRINT oPrn DEFINE FONT oFont NAME "Arial" SIZE 0, -8 OF oPrn PAGE ... ENDPAGE ENDPRINT oFont:End()

Important: You have to :End() the font object once you have finished and completed your printout work. <nWidth> <nClrText> A specific printer units width to use when printing the <cText> value. It is an optional parameter. An optional color to use when printing the <cText> value. It is an optional parameter.

CLAUSES PAGE ENDPAGE ENDPRINT FROM USER Starts a new page Ends the current printed page Ends printing Lets the user interactively select the printer to use. If you don't specify this clause, FiveWin will use the default printer installed in your system. Invokes the FiveWin preview system, which lets the user interactively preview the printout before sending it to the printer.

PREVIEW

-------------------------------------------------------------------------------PRINT.CH -------------------------------------------------------------------------------#ifndef _PRINT_CH #define _PRINT_CH //----------------------------------------------------------------------------// // Printer #xcommand PRINT [ <oPrint> ] ; [ <name:TITLE,NAME,DOC> <cDocument> ] ; [ <user: FROM USER> ] ; [ <prvw: PREVIEW> ] ; [ TO <xModel> ] ; => ; [ <oPrint> := ] PrintBegin( [<cDocument>], <.user.>, <.prvw.>, <xModel> ) #xcommand PRINTER [ <oPrint> ] ; [ <name:NAME,DOC> <cDocument> ] ; [ <user: FROM USER> ] ; [ <prvw: PREVIEW> ] ; [ TO <xModel> ] ; => ; [ <oPrint> := ] PrintBegin( [<cDocument>], <.user.>, <.prvw.>, <xModel> ) #xcommand PAGE => PageBegin() #xcommand ENDPAGE => PageEnd() #xcommand ENDPRINT => PrintEnd() #xcommand ENDPRINTER => PrintEnd() //----------------------------------------------------------------------------//

#endif

Você também pode gostar