Hide

SftPrintPreview/DLL 2.0 - Print Preview Control for C/C++

Display
Print

SFTPRINTPREVIEW_PRINTERRESULT Structure

The SFTPRINTPREVIEW_PRINTERRESULT structure is used with the GetCurrentPrinter, SetCurrentPrinter, CheckMarginsPrintableExternal and PrintSetupExternal functions.

typedef struct tagSftPrintPreviewPrinterResult {
    TCHAR szName[256];
    TCHAR szDevModeString[1000];
} SFTPRINTPREVIEW_PRINTERRESULT;
typedef const SFTPRINTPREVIEW_PRINTERRESULT * LPCSFTPRINTPREVIEW_PRINTERRESULT;

Members

szName

The name of the current printer. A zero-length string represents the default printer on entry to IsDefaultPrinter, SetCurrentPrinter, CheckMarginsPrintableExternal and PrintSetupExternal. GetCurrentPrinter and PrintSetupExternal return the new printer name.

szDevModeString

The printer setup information. When using SetCurrentPrinter, specify a zero-length string for szDevModeString to change just the current printer, without updating its settings. A zero-length string represents the printer's default settings on entry to IsDefaultPrinter, PrintSetupExternal and CheckMarginsPrintableExternal. GetCurrentPrinter and PrintSetupExternal return the new printer settings.

After calling GetCurrentPrinter and PrintSetupExternal, szDevModeString contains all current printer settings as a zero-terminated string and can be saved by the application (Registry, INI file, etc.). The SetCurrentPrinter function can be used to restore these settings at a later time. PrintSetupExternal can be used to change the printer setup.

Comments

The SFTPRINTPREVIEW_PRINTERRESULT structure is used with the GetCurrentPrinter, SetCurrentPrinter and PrintSetupExternal functions.

The GetCurrentPrinter function returns the current printer name and a string representing printer settings.

The SetCurrentPrinter function is used to change the current printer and optionally to update the current printer settings.

The PrintSetupExternal function invokes the Print Setup dialog for printer settings definition.

The IsDefaultPrinter function returns whether the SFTPRINTPREVIEW_PRINTERRESULT structure defines the default printer.

The CheckMarginsPrintableExternal function returns whether the specified margins are within the printer's printable area.

See Also C/C++ API | C++ Classes | Notifications


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.