Düzenle

Aracılığıyla paylaş


FORM_INFO_2 structure

Contains information about a localizable print form.

Syntax

typedef struct _FORM_INFO_2 {
  DWORD   Flags;
  LPTSTR  pName;
  SIZEL   Size;
  RECTL   ImageableArea;
  LPCSTR  pKeyword;
  DWORD   StringType;
  LPCTSTR pMuiDll;
  DWORD   dwResourceId;
  LPCTSTR pDisplayName;
  LANGID  wLangId;
} FORM_INFO_2, *PFORM_INFO_2;

Members

Flags

The form properties. The following values are defined, but only one can be set. When the FORM_INFO_2 is returned by GetForm or EnumForms, Flags is set to the current value in the forms database.

Value Meaning
FORM_USER If this bit flag is set, the form has been defined by the user. Forms with this flag set are defined in the registry.
FORM_BUILTIN If this bit-flag is set, the form is part of the spooler. Form definitions with this flag set do not appear in the registry. Built-in forms cannot be modified, so this flag should not be set when the structure is passed to AddForm or SetForm.
FORM_PRINTER If this bit flag is set, the form is associated with a certain printer, and its definition appears in the registry.

pName

A pointer to a null-terminated string that specifies the name of the form. The form name cannot exceed 31 characters.

Size

The width and height of the form in thousandths of millimeters.

ImageableArea

The width and height, in thousandths of millimeters, of the area of the page on which the printer can print.

pKeyword

A pointer to a non-localizable string identifier of the form. When passed to AddForm or SetForm, this gives the caller a means of identifying the form in all locales.

StringType

Specifies how a localized display name for the form is obtained at runtime. The following values are defined. Only one can be set in any given call to AddForm or SetForm. Both STRING_MUIDLL and STRING_LANGPAIR can be set in the FORM_INFO_2 (s) returned by GetForm or EnumForms. See Remarks.

Value Meaning
STRING_NONE There is no localized display name.
STRING_MUIDLL The display name is extracted from the Multilingual User Interface localized resources DLL specified in pMuiDll. The ID is in the dwResourceId member.
STRING_LANGPAIR The display name and language ID are provided directly by pDisplayName and the language is specified by wLangId.

pMuiDll

The Multilingual User Interface localized resource DLL that contains the localized display name.

dwResourceId

The resource ID of the form's display name in pMuiDll.

pDisplayName

The form's display name in the language specified by wLangId.

wLangId

The language of the pDisplayName.

Remarks

On a call to AddForm or SetForm:

  • If StringType is STRING_NONE, both pMuiDll and pDisplayName must be NULL and both dwResourceId and wLangId must be 0.
  • If StringType is STRING_MUIDLL, pDisplayName must be NULL and wLangId must be 0.
  • If StringType is STRING_LANGPAIR, pMuiDll must be NULL and dwResourceId must be 0.

For a FORM_INFO_2 returned by a call to GetForm or EnumForms:

  • If StringType is both STRING_MUIDLL and STRING_LANGPAIR, pMuiDll, pDisplayName, dwResourceId, and wLangId will all have valid values.
  • If StringType is STRING_MUIDLL only, pMuiDll and dwResourceId will have valid values. pDisplayName will be NULL and wLangId will be 0.
  • If StringType is STRING_LANGPAIR only, pDisplayName and wLangId will have valid values. pMuiDll will be NULL and dwResourceId will be 0.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Header
Winspool.h (include Windows.h)
Unicode and ANSI names
_FORM_INFO_2W (Unicode) and _FORM_INFO_2A (ANSI)

See also

Printing

Print Spooler API Structures

Multilingual User Interface

AddForm

GetForm

EnumForms

SetForm