PXV_Inst.ShowMsgBox(message, title, header, wHandle, flags) does not show the message box

PDF-XChange Editor SDK for Developers

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

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.
prasantha
User
Posts: 50
Joined: Fri Jun 24, 2022 8:15 am

PXV_Inst.ShowMsgBox(message, title, header, wHandle, flags) does not show the message box

Post by prasantha »

I created custom pane using pdf exchange editor sdk. I called the PXV_Inst.ShowMsgBox(message, title, header, wHandle, flags) method when anitem in that pane is deleted. I closed the opened pdf document if exists using
AxPXV_Control.Doc.Close() method.
Every call to PXV_Inst.ShowMsgBox(message, title, header, wHandle, flags) after closing the document does not show the message box.

I can see that it vanished as soon as it appears.
PXV_Inst.ShowMsgBox(message, title, header, wHandle, flags) call returtns 7 , that is its same as select "No" option .

So can anyone let me know know whats wrong here and how can I show the messge box after close the opened pdf document.

Thank You in advance
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2445
Joined: Thu Jun 30, 2005 4:11 pm

Re: PXV_Inst.ShowMsgBox(message, title, header, wHandle, flags) does not show the message box

Post by Vasyl - PDF-XChange »

Hi prasantha.

I guess there might be problem with wHandle parameter. It depends how you get it. When you used:

wHandle = PXV_Inst.GetDlgParentWnd(doc)
or
wHandle = doc.ActiveView.Obj.GetFirstWndHandle();

then obtained wHandle is valid until doc is valid. Please check this case..

HTH.
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
prasantha
User
Posts: 50
Joined: Fri Jun 24, 2022 8:15 am

Re: PXV_Inst.ShowMsgBox(message, title, header, wHandle, flags) does not show the message box

Post by prasantha »

Thank you for your respnse.

I have used the parent form's handle. like mainForm.Handle where mainForm is type of Windows form.
So this form is active always.

one more observation is , a the very first time the project is start up. no any pdf is opened. but when i tryto delete item, it shouws the error message. this error occured only after close the opened pdf document .

so I am not sure which handle should I use here
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2445
Joined: Thu Jun 30, 2005 4:11 pm

Re: PXV_Inst.ShowMsgBox(message, title, header, wHandle, flags) does not show the message box

Post by Vasyl - PDF-XChange »

We couldn't reproduce that trouble with ShowMsgBox...
Can you provide a simple sample project to reproduce it on our side?
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.