IUIX_Inst::CreateButton Method
From PDF XChange PDF SDK
(Automatic page editing by robot) |
|||
(10 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | __NOTOC__ | ||
[[Category:Editor]] | [[Category:Editor]] | ||
{{#customTitle:IUIX_Inst::CreateButton Method}} | {{#customTitle:IUIX_Inst::CreateButton Method}} | ||
+ | {{#parentPage:PXV:IUIX_Inst#Methods|CreateButton|method}} | ||
− | + | ||
+ | Creates object of [[PXV:IUIX_Button|IUIX_Button]] interface. | ||
== Syntax == | == Syntax == | ||
− | <pre class="brush:cpp;gutter:false">HRESULT CreateButton([in] IUIX_Obj* pParent, [in] RECT* pRect, [in] BSTR pID, [in] BSTR pText, [in, | + | <pre class="brush:cpp;gutter:false">HRESULT CreateButton([in] IUIX_Obj* pParent, |
+ | [in] RECT* pRect, | ||
+ | [in] BSTR pID, | ||
+ | [in] BSTR pText, | ||
+ | [in, defaultvalue(0)] LONGLONG nStyle, | ||
+ | [in, defaultvalue(NULL)] IUnknown* pImageOrIcon, | ||
+ | [in, defaultvalue(NULL)] IUnknown* pCustomImpl, | ||
+ | [out, retval] IUIX_Button** pButton);</pre> | ||
== Parameters == | == Parameters == | ||
− | ; | + | ;pParent |
− | :[in] | + | :[in] parent object. |
− | ; | + | ;pRect |
− | :[in] | + | :[in] dialog area where created object will be located. |
− | ; | + | ;pID |
− | :[in] | + | :[in] string ID of created object. |
− | ; | + | ;pText |
− | :[in] | + | :[in] text of the button. |
− | ; | + | ;nStyle |
− | :[in, | + | :[in, defaultvalue(0)] button style flags. See [[PXV:UIX_ButtonStyleFlags|UIX_ButtonStyleFlags]] for full list of button style flags. |
− | ; | + | ;pImageOrIcon |
− | :[in, optional] | + | :[in, optional] button image. '''pImageOrIcon''' object must implement [[PXV:IUIX_Icon|IUIX_Icon]] or [[PXV:IUIX_ImageData|IUIX_ImageData]] interface. |
− | + | ;pCustomImpl | |
− | :[in, optional] | + | :[in, optional] custom implementation of [[PXV:IUIX_Button|IUIX_Button]] interface. Set this parameter if you need to use your own interface implementation instead of default one. |
− | ; | + | ;pButton |
− | :[out, retval | + | :[out, retval] return object of [[PXV:IUIX_Button|IUIX_Button]] interface. |
== Return Value == | == Return Value == | ||
− | Returns S_OK if operation was successful or error code | + | Returns S_OK if the operation was successful, or will return an error code if it fails. |
== See Also == | == See Also == | ||
− | + | [[PXV:IUIX_Inst|IUIX_Inst]] |
Latest revision as of 15:39, 15 June 2015
Creates object of IUIX_Button interface.
Syntax
HRESULT CreateButton([in] IUIX_Obj* pParent, [in] RECT* pRect, [in] BSTR pID, [in] BSTR pText, [in, defaultvalue(0)] LONGLONG nStyle, [in, defaultvalue(NULL)] IUnknown* pImageOrIcon, [in, defaultvalue(NULL)] IUnknown* pCustomImpl, [out, retval] IUIX_Button** pButton);
Parameters
- pParent
- [in] parent object.
- pRect
- [in] dialog area where created object will be located.
- pID
- [in] string ID of created object.
- pText
- [in] text of the button.
- nStyle
- [in, defaultvalue(0)] button style flags. See UIX_ButtonStyleFlags for full list of button style flags.
- pImageOrIcon
- [in, optional] button image. pImageOrIcon object must implement IUIX_Icon or IUIX_ImageData interface.
- pCustomImpl
- [in, optional] custom implementation of IUIX_Button interface. Set this parameter if you need to use your own interface implementation instead of default one.
- pButton
- [out, retval] return object of IUIX_Button interface.
Return Value
Returns S_OK if the operation was successful, or will return an error code if it fails.