次の方法で共有


FORMPRINTSETUP

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

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;

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 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 whereas the FORMPRINTSETUP structure must be freed with the MAPIFreeBuffer function.

See Also

Reference

IMAPIViewContext::GetPrintSetup

MAPIFreeBuffer

MAPIAllocateBuffer

Concepts

MAPI Structures