Hi support,
Attempting to open, for example, a ZIP file with the EU Editor, the following dialog appears:
I'm opening document from code using "op.openDoc" operation.
When a document cannot be opened the IOperation's Do method will raise an OLE Exception with some Hresult.
[Q1] How can I display the above dialog when the Do method fails?
[Q2] What is the Hresult error raised ("82190003" is the value) - is it any of standard OLE return values or system error codes?
-žarko
Opening documents using op.openDoc - handle error + display "cannot open the document" dialog ... SOLVED
Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Opening documents using op.openDoc - handle error + display "cannot open the document" dialog ...
Hello žarko,
As for the question 2 - you can read the forum rules and there would be a method with the help of which you can get the error description string.
As for the dialog - that is a simple message box that is shown by using the https://sdkhelp.pdf-xchange.com/vi ... ShowMsgBox method.
The IDs of the strings are msg.OpenDocError.Text for text, and you should specify the file name in place of the %1. As for the title - the ID is msg.OpenDocError.Hdr.
The styles are UIX_MsgBox_IconError | UIX_MsgBox_AppModal | UIX_MsgBox_StdButtonsAsCommands and UIX_MsgBox_IgnoreCancel or UIX_MsgBox_Close for buttons.
Cheers,
Alex
As for the question 2 - you can read the forum rules and there would be a method with the help of which you can get the error description string.
As for the dialog - that is a simple message box that is shown by using the https://sdkhelp.pdf-xchange.com/vi ... ShowMsgBox method.
The IDs of the strings are msg.OpenDocError.Text for text, and you should specify the file name in place of the %1. As for the title - the ID is msg.OpenDocError.Hdr.
The styles are UIX_MsgBox_IconError | UIX_MsgBox_AppModal | UIX_MsgBox_StdButtonsAsCommands and UIX_MsgBox_IgnoreCancel or UIX_MsgBox_Close for buttons.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Opening documents using op.openDoc - handle error + display "cannot open the document" dialog ...
Alex,
How do I go from "msg.OpenDocError.Hdr" to the actual string?
-ž
How do I go from "msg.OpenDocError.Hdr" to the actual string?
-ž
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Opening documents using op.openDoc - handle error + display "cannot open the document" dialog ... SOLVED
Hello žarko,
This method gives the localized string:
https://sdkhelp.pdf-xchange.com/vi ... etLocalStr
Cheers,
Alex
This method gives the localized string:
https://sdkhelp.pdf-xchange.com/vi ... etLocalStr
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ