This function saves the settings entered in the "Print Setup" dialog.

[C++Builder]     BOOL IKSetPrint(HWND hWnd, LPCTSTR PrintFileName);
[Delphi]         function IKSetPrint(hWnd: HWND; PrintFileName: PChar): LongBool;

Parameters

Name Explanation
hWnd The window handle
PrintFileName The filename of the file containing the printer settings

Return Value

Returns True (nonzero) if successful. Returns False (0) if unsuccessful.

Explanation

The IKSetPrint function displays the "Print Setup" dialog and allows you to set the printer settings. When the OK button in the "Print Setup" dialog is clicked, the IKSetPrint function saves these setting in a file specified by the PrintFileName parameter. At the same time, the printer name and the port are saved in another text file whose name is constructed from the value of the PrintFileName parameter + "PrnTxt". The first record in this text file is the printer name. The second record in this text file is the printer port. (The records are delimited by {CR}{LF}).

The printer settings saved in the above files are used by the IKGetDevModeHandle and IKPrintCreateDC functions. Note: If only a file name is specified in the PrintFileName parameter and not a path, then the printer information files are saved in the current directory.

 

The ImageKit10 VCL is a product created by Newtone Corporation