- import declarations
- Boolean
WP_IsPrinterValid()
True if the the current printer is a valid one. False, otherwise.
- Boolean
WP_ArePrintersInstalled()
determines whether at least one printer is installed
True, if a printer is installed, False if it is not.
- Boolean
WP_ExecutePrinterSetupDialog(Handle hWndParent)
displays the "printer setup" dialog
window handle of the parent window
True if the OK button pressed; False, otherwise.
- Boolean
WP_ExecutePrintDialog(Handle hWndParent)
displays the "Print" dialog
window handle of the parent window
True if the OK button pressed; False, otherwise.
- Boolean
WP_GetCurrentDevice(Address aDevice)
retrieves the name of the current printer device
address of the string (255 chars) that will hold the device name upon return
True, if success; False if error occurred
- UInteger
WP_GetPrintDialogFlags()
retrieves the current print options
array of flags representing print-related options that are currently set
- UInteger
WP_GetUserDefinedPapersize()
gets the size of user-defined paper
// hi-word=length; lo-word=width
- Boolean
WP_IsPrintDialogFlagSet(UInteger iFlag)
determines whether a specific print-flag is set
the printer flag
True, if the flag is set; False, if it isn't
- Boolean
WP_SelectPrinter(String sDevice)
selects a printer programatically
the name of the printer
True, if success; False, if error (such as an invalid printer name)
- Boolean
WP_SetFirstPagePaperSource(Integer iBin)
the bim constant
True if success, false if error
- Boolean
WP_SetNumberOfPrintCopies(UInteger iNumCopies)
sets the number of copies to print
number of copies to make
Always True
- Boolean
WP_SetSpecificPrintDialogFlag(UInteger fFlag)
Sets/unsets one printer flag
printer flag
True, if success; False if error occurred
- Boolean
WP_SetPrintDialogFlags(UInteger fFlags)
Sets/unsets all printer flags in one call
printer flags
True, if success; False if error occurred
- Boolean
WP_SetUserDefinedPapersize(UInteger iPaperSize)
sets the size of user-defined paper
hi-word=length; lo-word=width
True, if success; False if error occurred
- Boolean
WP_SetFontStyle(Integer iStyles)
sets multiple font attributes
series of flags
always True
- Boolean
WP_SetFontBold(Boolean bBold)
toggles the bold attribute of the current font
True to switch bold attribute on; False to switch it off
always True
- Boolean
WP_SetFontItalic(Boolean bItalic)
toggles the italic attribute of the current font
True to switch italic attribute on; False to switch it off
always True
- Boolean
WP_SetFontUnderline(Boolean bUnderline)
toggles the underline attribute of the current font
True to switch underline attribute on; False to switch it off
always True
- Boolean
WP_SetFontStrikeout(Boolean bStrikeout)
toggles the strikeout attribute of the current font
True to switch strikeout attribute on; False to switch it off
always True
- Boolean
WP_SetFontColor(Integer iColor)
sets the color of the current font
color of the font
always True
- Boolean
WP_SetFontHeight(UInteger iHeight)
sets the height of the font
height of the font in points (multiplied by 100. Eg 12.5 point should be sent as 1250)
always True
- Boolean
WP_SetFontName(String sFontName)
Sets the name of the font to use
name of the font to use
always True
- Boolean
WP_DrawBitmap(String sBitmap Integer iLeft Integer iTop Integer iWidth Integer iHeight Boolean bUpdateCurrentPosition)
Draws a bitmap (BMP, JPG)
Name of the bitmap
distance from left edge to draw bitmap
distance from top edge to draw bitmap
width of the bitmap
height of the bitmap
after drawing, should the current position be updated?
True, if OK; False, if an error occurred.
- Boolean
WP_DrawEllipse(Integer iLeft Integer iTop Integer iWidth Integer iHeight Integer iBorderColor Integer iFillColor Boolean bFill UInteger iThickness Boolean bUpdateCurrentPosition Boolean bWrap)
draws an elipse within a bounding rectangle
distance from left edge to draw the ellipse
distance from top edge to draw the ellipse
width of the bounding rectangle
height of the bounding rectangle
color of the ellipse's edge
internal color of the ellipse
should the ellipse be filled? (False=transparent)
thickness of the elipse
after drawing, should the current position be updated?
Should the ellipse be drawn on future soft-page breaks?
True, if OK; False, if an error occurred.
- Boolean
WP_DrawLine(Integer iLeft Integer iTop Integer iLength Boolean bHorizontal Integer iColor UInteger iThickness Boolean bUpdateCurrentPosition)
draws a line from the current position
distance from left edge to draw the line
distance from top edge to draw the line
length of the line
draw horizontal? (False=vertical)
color of the line
thickness of the line
after drawing, should the current position be updated?
True, if OK; False, if an error occurred.
- Boolean
WP_DrawRectangle(Integer iLeft Integer iTop Integer iWidth Integer iHeight Integer iBorderColor Integer iFillColor Boolean bFill UInteger iThickness Boolean bUpdateCurrentPosition Boolean bWrap)
draws a rectangle
distance from left edge to draw the rectangle
distance from top edge to draw the rectangle
width of the rectangle
height of the rectangle
color of the rectangle's border
internal color of the rectangle
should the rectangle be filled? (False=transparent)
thickness of the rectangle's border
after drawing, should the current position be updated?
Should the rectangle be drawn on future soft-page breaks?
True, if OK; False, if an error occurred.
- Boolean
WP_DrawXYLine(Integer iLeftStart Integer iTopStart Integer iLeftEnd Integer iTopEnd Integer iColor UInteger iThickness Boolean bUpdateCurrentPosition Boolean bWrap)
draws a line between two points
distance from left edge to draw from
distance from top edge to draw from
distance from left edge to draw to
distance from top edge to draw to
color of the line
thickness of the line
after drawing, should the current position be updated?
Should the line be drawn on future soft-page breaks?
True, if OK; False, if an error occurred.
- Boolean
WP_SetAbsoluteMargins(UInteger iTop UInteger iBottom Boolean bAllPages)
modifies the top/bottom non-printable margin
the top margin offset
the bottom margin offset
should all pages be affected? True=AllPages; False=first page only
always True
- Boolean
WP_SetMargins(UInteger iLeft UInteger iTop UInteger iRight UInteger iBottom)
Sets the user-margins
the left margin
the top margin
the right margin
the bottom margin
always True
- Handle
WP_CreateDiagram(UInteger eType UInteger eEffect UInteger iWidth UInteger iHeight Boolean bDrawXyAxis)
Creates a new diagram
type of diagram (Bar, Line, Pie)
how it is drawn (2d or 3d, etc)
width of the diagram
height of the diagram
draw the xy-axis (for bar charts only)?
unique id for the diagram used in other diagram funtions
- Boolean
WP_AddDiagramEntry(Handle hDiagram String sValueDescription String sValue Integer iBorderColor Integer iFillColor Boolean bFilled UInteger iNumDecimals UInteger eValueOrPercent Boolean bExploded)
Adds an item into a diagram
diagram handle returned by CreateDiagram()
description of the item
value of the item
color of the item's border
color of the item's interior
should the item be drawn filled (with iFillColor), or transparent?
Number of decimals in the sValue argument
How the value should be displayed (as value or percentage, etc)
should the value be "pulled out" (pie charts only)
True, if success; False, if error
- Boolean
WP_DrawDiagram(Handle hDiagram UInteger iLeft UInteger iTop Boolean bUpdateCurrentPosition)
draws a diagram
diagram handle returned by CreateDiagram()
x-coordinate to draw the diagram
y-coordinate to draw the diagram
after drawing, should the current position be updated?
True, if success; False, if error
- Boolean
WP_LockDiagram(Handle hDiagram)
Locks a diagram so that no more entries can be added
diagram handle returned by CreateDiagram()
True, if success; False, if error
- Boolean
WP_SetDiagramCaption(Handle hDiagram String sCaption)
Sets the caption of a diagram
diagram handle returned by CreateDiagram()
the diagram's caption
True, if success; False, if error
- Boolean
WP_SetDiagramXText(Handle hDiagram String sText)
Sets the horizontal label of a diagram
diagram handle returned by CreateDiagram()
the diagram's horizonal label
True, if success; False, if error
- Boolean
WP_SetDiagramYText(Handle hDiagram String sText Boolean bVerticalText)
Sets the vertical label of a diagram
diagram handle returned by CreateDiagram()
the diagram's vertical label
should the text be drawn vertically (False=horizontally)
True, if success; False, if error
- Boolean
WP_BeginHeader(UInteger iHeaderType UInteger iSubHeaderNum)
creates a new header
the type of header
for subheaders, then number (1-0)
always True
- Boolean
WP_EndHeader()
declares the end of the current header
always True
- Boolean
WP_SetExtraLineCheck(UInteger iNumLines)
forces a soft page break if header plus number of lines don't fit on page
number of lines in addition to header required before forcing a soft page-break
always True
- Boolean
WP_SetHeaderFrame(UInteger eFrame Integer iColor UInteger iThickness Integer iFillCol Boolean bFilled)
sets the style, color and frame of a header
style of frame (margin-to-margin, etc)
color of the frame's edge
thickness of the frame
the internal color of the frame (only used if bBilled=True)
True, if the frame should be filled with the iFillColor (False=Transparent)
Always True
- Boolean
WP_SetHeaderMargin(UInteger eType Integer iSize)
Sets a margin of space on the inside and outside of the current header
Specifies which margin areas is being set.
Size of the margin setting in the current report metrics
False if document is not started
- Boolean
WP_SetHeaderPlacement(UInteger ePlacement)
placement (left, center or right) of the header
placed left, center or right
always True
- Boolean
WP_SetHeaderWrap(Boolean bWrap)
determines whether the current header is drawn on soft page-breaks
True, to wrap onto following pages; False, for current page only
always True
- Boolean
WP_WriteHeader(UInteger eHeaderType UInteger iSubHeaderNum)
writes a header to the current page
type of header
for subheaders, the number (1-9)
True, if success; False, if error
- Integer
WP_RGBToDFPrintColor(UInteger iRed UInteger iGreen UInteger iBlue)
converts R, G, and B values into a composite color that WinPrint expects
red component (1-255)
green component (1-255)
blue component (1-255)
composite color
- UInteger
WP_GetMetrics()
gets the current unit of measurement
unit of measurement (Inch or CM)
- Boolean
WP_SetMetrics(UInteger eMetrics)
sets the unit of measurement
Inch or CM
always True
- Boolean
WP_ClearDocument()
clears the resources of the document from memory
always True
- Boolean
WP_NewDocument(Boolean bAutoPreview)
starts a new document, but preserves the printer settings
Should the Previewer be displayed immediately
True, if success; False, if an error occurred
- Boolean
WP_EndDocument()
Indicates that the document is finished
always True
- Boolean
WP_ClearPrinter()
clears all printer and document resources
True, if success; False, if an error occurred
- Boolean
WP_ConfirmLines(UInteger iNumLines)
ensures that a specified number of lines will fit on the page; if not, a soft page-break is performed automatically
number of lines that must fit on the page
True, if success; False, if an error occurred
- UInteger
WP_CreatePage(UInteger iNumColumns)
creates a new page of specified columns
number of columns (zero= no columns)
page number that was created
- Handle
WP_PreviewDocument(Boolean bPrintDialog Boolean bPrintSetup Boolean bPrint)
previews the current document
Determines whether the Print Dialog (range, etc) is displayed when the "print" button is clicked in the preview window.
Determines whether the Print Setup button is enabled (allows to change orientation, etc)
Determines whether the Print button is enabled
non-zero = hViewerProcess; zero= error
- Boolean
WP_ClosePreview()
closes the preview window
True, if closed; False, if an error occurred (such as it not being already open)
- Boolean
WP_PrintDocument(Handle hWndParent)
prints the current document
window handle of object to use for any modal output
True, if success; False, if an error occurred
- Boolean
WP_SetAlign(UInteger eAlign)
align future text
left, center or right
always True
- Boolean
WP_WriteText(String sText Boolean bNewLineAfterPrint UInteger iColumnNum Integer iNumDecimals UInteger iWidth)
write text to the current position or column
the text to write
should a "CR" be written after the text
number of the column to write to (zero=no column, use current position)
number of decimals in the text (-1 means sText is a string)
width of text before truncating
True, if success; False, if an error occurred
- Boolean
WP_WriteTextAtPosition(String sText Boolean bNewLineAfterPrint UInteger iPosition Integer iNumDecimals UInteger iWidth)
writes text to a specific position
the text to write
should a "CR" be written after the text
horizontal position to write the text
number of decimals in the text (-1 means sText is a string)
width of text before truncating
True, if success; False, if an error occurred
- Boolean
WP_SetProgressCaption(String sProgressCaption)
- Boolean
WP_SetReportTitle(String sCaption)
- Integer
WP_ViewerWantsToClose()
- Integer
WP_DisplayMessageBox(String sCaption String sText)
- Handle
WP_GetViewerWindow()
- Integer
WP_GetDocumentStatus()
returns dsNotStarted, dsStarted, or dsFinished