IPXV_Inst::ShowMsgBoxEx Method
From PDF XChange PDF SDK
(2 intermediate revisions by one other user not shown) | |||
Line 5: | Line 5: | ||
{{ToReview}} | {{ToReview}} | ||
− | The extended method to show the custom message box. | + | The extended method to show the custom message box in main thread. |
== Syntax == | == Syntax == | ||
Line 28: | Line 28: | ||
== 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 error code in other cases. | ||
+ | |||
+ | == Sample == | ||
+ | <pre class="brush:cpp">//C++ | ||
+ | HRESULT ShowWarningMsgBox() | ||
+ | { | ||
+ | UIX_MsgBoxConfig cfg = { 0 }; | ||
+ | cfg.nSize = sizeof(UIX_MsgBoxConfig); | ||
+ | cfg.nStyle = UIX_MsgBox_IconWarning | UIX_MsgBox_OK | UIX_MsgBox_AppModal; | ||
+ | cfg.pTitle = L"Warning Title"; | ||
+ | cfg.pText = L"Warning Text"; | ||
+ | cfg.pPos = nullptr; | ||
+ | cfg.hWndParent = (SIZE_T)::GetFocus(); | ||
+ | return m_pInst->ShowMsgBoxEx(&cfg, nullptr, nullptr, nullptr, nullptr); | ||
+ | } | ||
+ | </pre> | ||
== See Also == | == See Also == | ||
− | [[PXV:IPXV_Inst|IPXV_Inst]], [[PXV:IUIX_Inst_ShowMsgBoxEx| | + | [[PXV:IPXV_Inst|IPXV_Inst]], [[PXV:IUIX_Inst_ShowMsgBoxEx|IUIX_Inst::ShowMsgBoxEx]], [[PXV:IPXV_Inst_ShowMsgBox|IPXV_Inst::ShowMsgBox]] |
Latest revision as of 02:51, 20 October 2018
The extended method to show the custom message box in main thread.
Syntax
HRESULT ShowMsgBoxEx([in] UIX_MsgBoxConfig* pConfig, [out] LONG* pOptionState, [out] LONG* pSelectedRadioID, [out] BSTR* ppEditText, [out, retval, defaultvalue(NULL)] LONG_PTR* pRes);
Parameters
- pConfig
- [in] Pointer to UIX_MsgBoxConfig structure.
- pOptionState
- [out] Returns actual state of check-box on the message dialog.
- pSelectedRadioID
- [out] Returns ID of selected radio-box on the message dialog.
- ppEditText
- [out] Returns the text, entered by user in edit-box on the message dialog.
- pRes
- [out, retval, defaultvalue(NULL)] Returns the user's choice identifier. For possible values see UIX_MsgBoxResult.
Return Value
Returns S_OK if operation was successful or error code in other cases.
Sample
//C++ HRESULT ShowWarningMsgBox() { UIX_MsgBoxConfig cfg = { 0 }; cfg.nSize = sizeof(UIX_MsgBoxConfig); cfg.nStyle = UIX_MsgBox_IconWarning | UIX_MsgBox_OK | UIX_MsgBox_AppModal; cfg.pTitle = L"Warning Title"; cfg.pText = L"Warning Text"; cfg.pPos = nullptr; cfg.hWndParent = (SIZE_T)::GetFocus(); return m_pInst->ShowMsgBoxEx(&cfg, nullptr, nullptr, nullptr, nullptr); }