L_DlgPrintPreview

Summary

Displays the print preview dialog box for a single image printing.

Syntax

#include "l_bitmap.h"

L_LTDLG_API L_INT L_DlgPrintPreview(hWndOwner, pDlgParams)

Parameters

L_HWND hWndOwner

Handle of the window that owns the dialog.

LPPRINTPREVIEWDLGPARAMS pDlgParams

Pointer to a PRINTPREVIEWDLGPARAMS structure to be updated with the values entered by the user through the dialog. Set members of this structure, before calling this function, to set the dialog's initial values.

Comments

The Print Preview dialog for printing a single image.

To use this dialog you must have a printer installed.

Returns

Value Meaning
SUCCESS_DLG_EXIT "Exit" was selected from the menu or the window was closed, and the dialog exited successfully.
< 1 An error occurred. Refer to Return Codes.

Required DLLs and Libraries

See Also

Functions

Topics

Example

L_INT DlgPrintPreviewExample(HWND hWnd,pBITMAPHANDLE pBitmap) 
{ 
   L_INT nRet; 
   PRINTPREVIEWDLGPARAMS DlgParams; 
 
   memset ( &DlgParams, 0, sizeof ( PRINTPREVIEWDLGPARAMS ) ) ; 
 
   DlgParams.uStructSize = sizeof ( PRINTPREVIEWDLGPARAMS ) ; 
   DlgParams.pBitmap     = pBitmap ; 
   DlgParams.nCmdShow    = SW_SHOW ; 
 
   nRet = L_DlgInit ( DLG_INIT_COLOR ) ; 
   if(nRet != SUCCESS && nRet != ERROR_DLG_ALREADYINITIATED) 
      return nRet; 
   nRet = L_DlgPrintPreview( hWnd, &DlgParams ) ; 
   if(nRet < 1) 
      return nRet; 
   nRet = L_DlgFree ( ) ; 
   if(nRet != SUCCESS) 
      return nRet; 
 
   if ( DlgParams.hDevMode ) 
   { 
      GlobalFree ( DlgParams.hDevMode ) ; 
   } 
 
   if ( DlgParams.hDevNames ) 
   { 
      GlobalFree ( DlgParams.hDevNames ) ; 
   } 
   return SUCCESS; 
} 
Help Version 22.0.2023.2.3
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Common Dialog C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.