FORMPRINTSETUP 

The FORMPRINTSETUP structure describes the print setup information for the form object.

Quick Info

Header file:

MAPIFORM.H

 

typedef struct

    ULONG        ulFlags;

    HDEVMODE     hDevMode;

    HDEVNAMES    hDevNames;

    ULONG        ulFirstPageNumber;

    ULONG        ulFPrintAttachments;

} FORMPRINTSETUP, FAR * LPFORMPRINTSETUP;

 

Members

ulFlags

Bitmask of flags that controls the type of the strings. The following flag can be used:

MAPI_UNICODE

The strings are in Unicode format. If the MAPI_UNICODE flag is not set, the strings are in ANSI format.

hDevmode

Handle to the mode of the printer.

hDevnames

Handle to the path of the printer.

ulFirstPageNumber

Page number of the first page to be printed.

ulFPrintAttachments

Flag that indicates whether there are attachments to be printed. If there are attachments to print, the ulFPrintAttachments member is set to 1. If there are no attachments to print, it is set to 0.

Remarks

The FORMPRINTSETUP structure is used to describe the print setup information for the form object. Implementations of IMAPIViewContext::GetPrintSetupJMMVCU fill in the FORMPRINTSETUP structure and return it in the lppformprintsetup output parameter of GetPrintSetup.

If the MAPI_UNICODE flag is passed in the ulflags parameter of GetPrintSetup, the strings in the hDevmode and hDevnames members should be in Unicode format. Otherwise, the strings should be ANSI format.

The hDevMode and hDevNames members must be allocated using the Windows function GlobalAlloc and must be freed using the Windows function GlobalFree. The FORMPRINTSETUP structure must be freed by the calling form object using the MAPIFreeBuffer16U06F function. The application must free the FORMPRINTSETUP structure using MAPIFreeBuffer and the other two items using GlobalFree. 

See Also

IMAPIViewContext::GetPrintSetupJMMVCU, MAPIFreeBuffer16U06F