Skip to content

RGBToWPColor - cWinReport2

Converts a standard RGB color to a Winprint RGB color value

Type: Function
Return Data Type: Integer

Parameters

Parameter Type Description
iRgb Integer Standard RGB color value

Syntax

Function RGBToWPColor Integer iRgb Returns Integer

Call Example

Get RGBToWPColor iRgb to IntegerVariable

Description

The RGB values used by WinPrint2 are different than the RGB color values used by the rest of DataFlex (which uses standard RGB values). You can convert a standard RGB value to a WinPrint value by calling this function.

Procedure Page_Title
    integer iColor iForeColor

    Get RgbToWPColor clTeal  to iColor
    Get RgbToWPColor clOlive to iForeColor
    DFFont "Arial"
    DFFontSize 14
    DFBeginHeader DFPageTitle
        DFHeaderFrame HDR_MARGINs 0.01 iColor iColor
        DFHEADERPOS HDR_LEFT
        DFWritelnPos "Orders by Customer Report" 0.10 (FONT_BOLD+iForeColor)
    DFEndHeader
End_Procedure

The DFGetDFColor can be used to convert individual R(ed), G(reen), B(lue) values into a WinPrint2 color value.

The DataFlex Constants are defined in rgb.pkg

See Also

DFGetDFColor

Return Value

Returns a WinPrint2 color value