Help Center

CPrint.PrintBitmapToFilemethod

Prints a Windows bitmap in the specified file.

PrintingmethodCPrint.incdocumented

Syntax

FUNCTION PrintBitmapToFile ( BYREF wszDocName AS WSTRING, BYREF wszOutputFileName AS WSTRING, BYVAL hbmp AS HBITMAP, BYVAL bStretch AS BOOLEAN = FALSE, BYVAL nStretchMode AS LONG = InterpolationModeHighQualityBicubic ) AS BOOLEAN

Parameters

NameDescription
wszDocNameWSTRING. The document name.
wszOutputFileNameWSTRING. The output file name.
hbmpHBITMAP. Handle to the bitmap.
bStretchBOOLEAN. Optional. True to strech the image or false. Defaults to False.
nStretchModeLONG. Optional. Stretching mode. Defaults to InterpolationModeHighQualityBicubic.
Predefined constants:
InterpolationModeLowQuality = Specifies a low-quality mode.
InterpolationModeHighQuality = Specifies a high-quality mode.
InterpolationModeBilinear = Specifies bilinear interpolation. No prefiltering is done. This mode is not suitable for shrinking an image below 50 percent of its original size.
InterpolationModeBicubic = Specifies bicubic interpolation. No prefiltering is done. This mode is not suitable for shrinking an image below 25 percent of its original size.
InterpolationModeNearestNeighbor = Specifies nearest-neighbor interpolation.
InterpolationModeHighQualityBilinear = Specifies high-quality, bilinear interpolation. Prefiltering is performed to ensure high-quality shrinking.
InterpolationModeHighQualityBicubic = Specifies high-quality, bicubic interpolation. Prefiltering is performed to ensure high-quality shrinking. This mode produces the highest quality transformed images.

Return value

BOOLEAN. Returns TRUE if the bitmap has been printed successfully, or FALSE otherwise.

Description

Prints a Windows bitmap to the specified output file.

Reference

  • Include file CPrint.inc
  • Defined in AfxNova/CPrint.inc:1021
  • Documented in Printing/CPrint Class.md
  • Topic: CPrint Class