SftPrintPreview/OCX 1.0

SftPrintPreview.PrintDDB Method

Softel vdm, Inc.

Displays/prints a device dependent bitmap.

Syntax       

VB.NET

object.PrintDDB(ByVal BitmapHandle As Integer, ByVal PrinterDC As Integer, ByVal XPrinterPix As OLE_XPOS_PIXELS, ByVal YPrinterPix As OLE_XPOS_PIXELS, ByVal WPrinterPix As OLE_XSIZE_PIXELS, ByVal HPrinterPix As OLE_YSIZE_PIXELS, ByVal WDispPix As Integer, ByVal HDispPix As Integer)

VB

object.PrintDDB(ByVal BitmapHandle As Long, ByVal PrinterDC As Long, ByVal XPrinterPix As OLE_XPOS_PIXELS, ByVal YPrinterPix As OLE_XPOS_PIXELS, ByVal WPrinterPix As OLE_XSIZE_PIXELS, ByVal HPrinterPix As OLE_YSIZE_PIXELS, ByVal WDispPix As Long, ByVal HDispPix As Long)

C#.NET

void object.PrintDDB(int BitmapHandle, int PrinterDC, OLE_XPOS_PIXELS XPrinterPix, OLE_XPOS_PIXELS YPrinterPix, OLE_XSIZE_PIXELS WPrinterPix, OLE_YSIZE_PIXELS HPrinterPix, int WDispPix, int HDispPix);

VC++

HRESULT object->PrintDDB(long BitmapHandle, long PrinterDC, OLE_XPOS_PIXELS XPrinterPix, OLE_XPOS_PIXELS YPrinterPix, OLE_XSIZE_PIXELS WPrinterPix, OLE_YSIZE_PIXELS HPrinterPix, long WDispPix, long HDispPix);

C

HRESULT object->raw_PrintDDB(long BitmapHandle, long PrinterDC, OLE_XPOS_PIXELS XPrinterPix, OLE_XPOS_PIXELS YPrinterPix, OLE_XSIZE_PIXELS WPrinterPix, OLE_YSIZE_PIXELS HPrinterPix, long WDispPix, long HDispPix);

Delphi

procedure object.PrintDDB(BitmapHandle : Integer, PrinterDC : Integer, XPrinterPix : Integer, YPrinterPix : Integer, WPrinterPix : OLE_XSIZE_PIXELS, HPrinterPix : OLE_YSIZE_PIXELS, WDispPix : Integer, HDispPix : Integer);

object

A SftPrintPreview object.

BitmapHandle

The bitmap handle of the bitmap to be printed.

PrinterDC

The printer device context.

XPrinterPix

The horizontal offset in printer coordinates, where the bitmap is printed.

YPrinterPix

The vertical offset in printer coordinates, where the bitmap is printed.

WPrinterPix

The width of the printed bitmap (in printer coordinates).

HPrinterPix

The height of the printed bitmap (in printer coordinates).

WDispPix

The width of the bitmap (in pixels, screen coordinates).

HDispPix

The height of the bitmap (in pixels, screen coordinates).

Comments

The PrintDDB method displays/prints a device dependent bitmap.

This method is not supported for use with Visual Basic 6.0 

Device dependent bitmaps (screen bitmaps) can be printed using the PrintDDB method. Screen bitmaps cannot usually be printed without losing their original size (e.g., using BitBlt).  The PrintDDB method is used to print bitmaps instead.  When printing a screen bitmap, the width and height of the bitmap need to be scaled to retain their approximate original dimensions once printed.

The GetDDBSize method retrieves the display and print size of a device dependent bitmap.


Feedback / comments / error reports for this topic
© 2004 - Softel vdm, Inc. - www.windowscontrols.com