IPXC_AcroForm::CreateField Method
From PDF XChange PDF SDK
(11 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
+ | __NOTOC__ | ||
[[Category:Editor]] | [[Category:Editor]] | ||
{{#customTitle:IPXC_AcroForm::CreateField Method}} | {{#customTitle:IPXC_AcroForm::CreateField Method}} | ||
+ | {{#parentPage:PXV:IPXC_AcroForm#Methods|CreateField|method}} | ||
− | Adds a new form field with widget or adds new widget to existing field. If there | + | Adds a new form field with widget or adds a new widget to an existing field. If there already is a field with the name specified by ''sName'' a new widget will be added if ''nType'' corresponds to the type of existing field. |
== Syntax == | == Syntax == | ||
− | <pre class="brush:cpp;gutter:false">HRESULT CreateField([in] LPWSTR sName, [in] PXC_FormFieldType nType, [in] ULONG | + | <pre class="brush:cpp;gutter:false">HRESULT CreateField([in] LPWSTR sName, |
+ | [in] PXC_FormFieldType nType, | ||
+ | [in] ULONG nPageIdx, | ||
+ | [in] PXC_Rect* pRect, | ||
+ | [out, retval] IPXC_FormField** ppField);</pre> | ||
== Parameters == | == Parameters == | ||
− | ; | + | ;sName |
− | :[in] Name of the field. | + | :[in] Name of the field. The name may contain the dot (.) character to specify the full field name. If there are no fields with the specified name the method will add it to the form. |
− | ; | + | ;nType |
− | :[in] | + | :[in] The value of [[PXV:PXC_FormFieldType|PXC_FormFieldType]] that specifies the new field type. |
− | ; | + | ;nPageIdx |
− | :[in] Specifies 0-based | + | :[in] Specifies the 0-based page number in the document where the widget should be added. |
− | ; | + | ;pRect |
− | :[in] Pointer to the [[PXV | + | :[in] Pointer to the [[PXV:PXC_Rect|PXC_Rect]] structure that defines the position and size of the widget on the page. It maybe be empty only for [[PXV:PXC_FormFieldType|FType_Signature]] type of field. |
− | ; | + | ;ppField |
− | :[out, retval] Pointer to [[PXV:IPXC_FormField|IPXC_FormField]] that receives | + | :[out, retval] Pointer to [[PXV:IPXC_FormField|IPXC_FormField]] that receives the object of the newly created field. |
== Return Value == | == Return Value == | ||
− | Returns S_OK if operation was successful or error code in other cases. | + | Returns '''S_OK''' if operation was successful or an error code in other cases. |
== See Also == | == See Also == | ||
− | + | [[PXV:IPXC_AcroForm|IPXC_AcroForm]] |
Latest revision as of 05:04, 26 May 2015
Adds a new form field with widget or adds a new widget to an existing field. If there already is a field with the name specified by sName a new widget will be added if nType corresponds to the type of existing field.
Syntax
HRESULT CreateField([in] LPWSTR sName, [in] PXC_FormFieldType nType, [in] ULONG nPageIdx, [in] PXC_Rect* pRect, [out, retval] IPXC_FormField** ppField);
Parameters
- sName
- [in] Name of the field. The name may contain the dot (.) character to specify the full field name. If there are no fields with the specified name the method will add it to the form.
- nType
- [in] The value of PXC_FormFieldType that specifies the new field type.
- nPageIdx
- [in] Specifies the 0-based page number in the document where the widget should be added.
- pRect
- [in] Pointer to the PXC_Rect structure that defines the position and size of the widget on the page. It maybe be empty only for FType_Signature type of field.
- ppField
- [out, retval] Pointer to IPXC_FormField that receives the object of the newly created field.
Return Value
Returns S_OK if operation was successful or an error code in other cases.