LPrint::PrintGDIPlus

#include "ltwrappr.h"

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

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

Parameters

HDC hDC

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

L_INT nX

Value that represents the X position to start the print.

L_INT nY

Value that represents the Y position to start the print.

L_INT nWidth

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

L_INT nHeight

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

L_UINT32 uFlags

Reserved for future use. Pass 0.

Returns

Value Meaning
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

See Also

Functions

Topics

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("C:\\LEADTOOLS21\\Resources\\Images\\image1.cmp")) ; 
   if(nRet != SUCCESS) 
      return nRet; 
 
   LPrint  MyPrint(&LeadBitmap) ; 
 
   //... 
 
   return SUCCESS; 
} 
Help Version 21.0.2021.4.8
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help