LPrint::PrintGDIPlus

#include "ltwrappr.h"

virtual L_INT LPrint::PrintGDIPlus(hDC=NULL, nX=0, nY=0, nWidth=0, nHeight=0, uFlags = 0)

HDC hDC;

/* handle to the target device context (DC) */

L_INT nX;

/* x position to start the print */

L_INT nY;

/* y position to start the print */

L_INT nWidth;

/* printed width */

L_INT nHeight;

/* printed height */

L_UINT32 uFlags;

/* flags, reserved pass 0 */

Prints the bitmap to the specified device context using GDI+.

Parameter

Description

hDC

Handle to the device context (DC) where the bitmap is to print. The mapping mode of the device context must be MM_TEXT

nX

Value that represents the X position to start the print.

nY

Value that represents the Y position to start the print.

nWidth

Value that represents the printed width, in pixels. The actual width depends on the dots per inch (DPI) of the printer.

nHeight

Value that represents the printed height, in pixels. The actual height depends on the dots per inch (DPI) of the printer.

uFlags

Reserved for future use. Pass 0.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

If GDI+ library is not installed to the system, an error code is returned.

Required DLLs and Libraries

LTDIS

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LPrint::Print, LPrint::PrintFast, Class Members

Topics:

Raster Image Functions: Printing Images

Example

// This is an example for LPrint::LPrint():
L_INT LPrint__LPrintExample_1()
{
    // this will call the default constructor and destructor when it is out of scope
    LPrint MyPrint;
    //...
    return SUCCESS;
}
// This is an example for LPrint::LPrint(pLBitmap):
L_INT LPrint__LPrintExample_2()
{
   L_INT nRet;
   LBitmapBase  LeadBitmap ;
   nRet = LeadBitmap.Load(TEXT("%UserProfile%\\My Documents\\LEADTOOLS Images\\image1.cmp")) ;
   if(nRet != SUCCESS)
      return nRet;
   LPrint  MyPrint(&LeadBitmap) ;
   //...
   return SUCCESS;
}