The FORMPRINTSETUP structure describes the print setup information for the form object.
Header file: | MAPIFORM.H |
typedef struct
{
ULONG ulFlags;
HDEVMODE hDevMode;
HDEVNAMES hDevNames;
ULONG ulFirstPageNumber;
ULONG ulFPrintAttachments;
} FORMPRINTSETUP, FAR * LPFORMPRINTSETUP;
The FORMPRINTSETUP structure is used to describe the print setup information for a form object. Implementations of IMAPIViewContext::GetPrintSetup fill in the FORMPRINTSETUP structure and return it in the contents of the lppFormPrintSetup output parameter of GetPrintSetup.
If the MAPI_UNICODE flag is passed in the ulFlags parameter of GetPrintSetup, the strings referenced by the hDevmode and hDevnames members should be in Unicode format. Otherwise, the strings should be in ANSI format.
Form viewers implementing IMAPIViewContext must allocate the FORMPRINTSETUP structure using the MAPI allocator function MAPIAllocateBuffer, but allocate the individual members, hDevMode and hDevNames, with the Windows function GlobalAlloc. The release of memory is handled similarly. The hDevMode and hDevNames members must be freed using the Windows function GlobalFree while the FORMPRINTSETUP structure must be freed with the MAPIFreeBuffer function.
Form Structures, IMAPIViewContext::GetPrintSetup, MAPIFreeBuffer