Syntax:
INT LlPrintWithBoxStart (HLLJOB hJob, UINT nObjType, LPCTSTR lpszObjName, INT nPrintOptions, INT nBoxType, HWND hWnd, LPCTSTR lpszTitle);
Task:
Starts the print job and opens the project file. Supports an abort window. If you use a data provider as data source, several project files can be passed here semicolon-separated. Then a combination print is performed and the outputs of the individual projects are summarized as total output. You can react to the callback LL_NTFY_COMBINATIONPRINTSTEP.
Parameter:
hJob: Job handle
nObjType: LL_PROJECT_LABEL, LL_PROJECT_LIST or LL_PROJECT_CARD
lpszObjName: The file name of the project with file extension.
For combination printing with a semicolon-separated list, you can also provide your own information for the LL_NTFY_COMBINATIONPRINTSTEP callback using the syntax "JOB=...". In addition to "JOB=", the identifiers "TOC=" (Table of Contents), "IDX=" (Index) and "GTC=" (Reverse Side) are also available. Example: "C:\temp\cover.lst;JOB=MyValue;C:\temp\report.lst"
nPrintOptions:
Value |
Meaning |
LL_PRINT_NORMAL |
output to printer |
LL_PRINT_PREVIEW |
output to preview |
LL_PRINT_FILE |
output to file |
LL_PRINT_EXPORT |
output to an export module that can be defined with LlPrintSetOptionString(LL_PRNOPTSTR_EXPORT) |
Optionally combined with one of the following flags:
Value |
Meaning |
LL_PRINT_MULTIPLE_JOBS |
output in several smaller print jobs (see below) with network spooler print. |
LL_PRINT_REMOVE_-UNUSED_VARS |
Fields and variables not required by the project are removed from the internal buffer after printing starts. This can speed up following declarations considerably. The recommended practice however is to query the required data using LlGetUsedIdentifiers() which is the better alternative. |
These options influence LL_OPTIONSTR_EXPORTS_ALLOWED.
nBoxType:
Value |
Meaning |
LL_BOXTYPE_NORMALMETER |
Abort box with bar meter and text
|
LL_BOXTYPE_BRIDGEMETER |
Abort box with bridge meter and text |
LL_BOXTYPE_EMPTYABORT |
Abort box with text |
LL_BOXTYPE_NORMALWAIT |
Box with bar meter and text, no abort button |
LL_BOXTYPE_BRIDGEWAIT |
Box with bridge meter and text, no abort button |
LL_BOXTYPE_EMPTYWAIT |
Box with text, no abort button |
LL_BOXTYPE_STDABORT |
Abort box with system bar meter |
LL_BOXTYPE_STDWAIT |
Box with bar meter, no abort button |
LL_BOXTYPE_NONE |
No box. |
Note that the Boxtype parameter is only listed here for compatibility with older operating systems. By default, the standard progress bar of the operating system is used.
hWnd: Window handle of the calling program (used as parent of the dialog box)
lpszTitle: Title of the abort dialog box, also appears as text in the print manager
Return Value:
Error code
Hints:
Please check the return value!
An application modal abort dialog box is shown as soon as the print starts. Its title is defined by the passed parameter. In the dialog box there is a percentage-meter-control and a two-line static text, both of which can be set using LlPrintSetBoxText() to show the user the print progress, and also an abort button if required (see below).
Example:
HLLJOB hJob;
hJob = LlJobOpen(0);
if
(LlPrintWithBoxStart(hJob, LL_PROJECT_LABEL, "test.lbl",
LL_PRINT_NORMAL, LL_BOXTYPE_NORMALMETER,
hWnd, "print") == 0)
{
LlPrintSetBoxText(hJob, "There we go",
0);
<... etc...>
LlPrintEnd(hJob,
0);
}
else
MessageBox(NULL, "error", "List & Label",
MB_OK);
LlJobClose(hJob);
See also:
LlPrintStart, LlPrintEnd