BiPrintImageExtGUI

#include "BIADVPRN.H"

 

HPRINTDLG CALLBACK BiPrintImageExtGUI( LPPRINT_DIBINFO  lpDIBInfoArray,
DWORD          dwDIBNum,
LPCTSTR         pszPrinterName,
DWORD          menuFlags,

                                                         DWORD          toolFlags,

                                                         LPPRINT_MENUINFO pMenu,

                                                         DWORD          dwMenuNum,

                                                         LPPRINT_TOOLINFO pTool,

                                                         DWORD          dwToolNum,

                                                         void FAR*     lpParam)

Description

This function displays a modeless print preview dialog. Many images can be loaded and printed to the same paper with this dialog. The advanced preview dialog can be customized with parameters. The user can customize the menu and the toolbar easily, and can add new menu items and toolbar buttons. The printer also can be selected with this dialog. The user defined menu items will be add to the Options menu. The image on user defined toolbar buttons must be 17x16 pixels, otherwise the button won’t be shown. The maximum button number on the toolbar is 21. If the user tries to define more buttons, the buttons won’t be displayed.

Additional Information

This example shows how to use the dll when loading statically including the header file. Otherwise if the dll is loaded dynamically, for further information read the “About the difference of static and dynamic library loading” section of the manual.

BiPrintImageExtGUI, BiPrintImageExtGUIW or BiPrintImageExtGUIA

Parameters

LPPRINT_DIBINFO

lpDIBInfoArray

Pointer to the structures of the DIBs. These images will display, when the dialog pops up.

DWORD

dwDIBNum

Specifies the size of the lpDIBInfoArray.

LPCTSTR

pszPrinterName

Name of the printer to print.

DWORD

MenuFlags

This parameter specifies the menu items to display on the dialog.

DWORD

toolFlags

This parameter specifies the toolbar items to display on the toolbar of the dialog.

LPPRINT_MENUINFO

pMenu

Pointer to the structures of the user defined menu items.

DWORD

dwMenuNum

Number of user defined menu items.

LPPRINT_TOOLINFO

pTool

Pointer to the structures of the user defined toolbar buttons.

DWORD

dwToolNum

Number of user defined toolbar buttons.

void FAR*

lpParam

A pointer to user defined data.

 

Available flags of Menu items:

MENU_LOAD_IMAGE                  Menu item of the opening image file.

MENU_DELETE_IMAGE              Menu item of the deleting imege from the page.

MENU_CLOSE                                Menu item of the closing dialog.

MENU_PRINT                                 Menu item of the printing.

MENU_COPY                                  Menu item of the copying image to the clipboard.

MENU_PASTE                                Menu item of the pasting image from the clipboard.

MENU_DELETE                             Menu item of the emptying the clipboard.

MENU_MEASUREMENT              Menu items of the changing measurement of the dialog.

MENU_FITPAGEPROP                  Menu item of the fitting page proportionally.

MENU_FITPAGE                            Menu item of the stretching page.

MENU_IMAGEDPI                         Menu item of the displaying image with DPI.

MENU_CENTERHOR                    Menu item of the centering image horizontally.

MENU_CENTERVERT                  Menu item of centering image vertically.

MENU_ROTATE                             Menu items of the rotating.

MENU_FLIP                                    Menu items of the flipping image.

MENU_PRINTERSETTINGS         Menu item of the displaying printer settings.

MENU_DRAWIMAGEBORDER   Menu item of the drawing border around the image.

 

Available flags of Toolbar items:

 

TOOL_LOAD_IMAGE                   Toolbar button of the opening image file.

TOOL_DELETE_IMAGE               Toolbar button of the deleting imege from the page.

TOOL_CLOSE                                 Toolbar button of the closing dialog.

TOOL_PRINT                                  Toolbar button of the printing.

TOOL_COPY                                   Toolbar button of the copying image to the clipboard.

TOOL_PASTE                                  Toolbar button of the pasting image from the

                                                            clipboard.

TOOL_DELETE                               Toolbar button of the emptying the clipboard.

TOOL_FITPAGEPROP                   Toolbar button of the fitting page proportionally.

TOOL_FITPAGE                             Toolbar button of the stretching page.

TOOL_IMAGEDPI                          Toolbar button of the displaying image with DPI.

TOOL_CENTERHOR                     Toolbar button of the centering image horizontally.

TOOL_CENTERVERT                    Toolbar button of centering image vertically.

TOOL_ROTATE                              Toolbar buttons of the rotating.

TOOL_FLIP                                     Toolbar buttons of the flipping image.

TOOL_DRAWIMAGEBORDER    Toolbar button of the drawing border around the

                                                           image.

 

Return values

It is the handle of the print preview dialog on success or NULL on error.

Requirements

Header :     Declared in BiAdvPrn.h; include BiAdvPrn.h.

Library :    Use BiAdvPrn.lib.

DLLs :       BiAdvPrn.dll, BiDlgs.dll.