Help Center

CPrint.PrintBitmapmethod

Prints a Windows bitmap in the attached printer.

PrintingmethodCPrint.incdocumented

Syntax

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

Parameters

NameDescription
wszDocNameWSTRING. The document 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 attached printer.

Reference

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