cancel cmd.newDocCombine process

PDF-XChange Editor SDK for Developers

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.
Post Reply
jusWest
User
Posts: 150
Joined: Fri Aug 24, 2018 8:26 am

cancel cmd.newDocCombine process

Post by jusWest »

Hello!

We use cmd.newDocCombine to start the merge documents dialog.

When we have chosen our documents and clicked the Ok button, there
is a progress dialog with a cancel button showing.

My question is, can I detect when a user presses the cancel button on
the progress dialog?

Regards
Ronny
jusWest
User
Posts: 150
Joined: Fri Aug 24, 2018 8:26 am

Re: cancel cmd.newDocCombine process

Post by jusWest »

is this a dumb question? Since there is no answer?

I have searched for a soution, but seems no one have asked this.

I tought I could use the MsgBoxEventMonitor : IUIX_EventMonitor class I have, but it seems
it is not firing any events in that class.
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: cancel cmd.newDocCombine process

Post by Sasha - Tracker Dev Team »

Hello jusWest,

That's not a dumb question at all - you will have to put your progress monitor listener wrapper before the operation is executed and remove it afterwards.
Or if you want to disable the Cancel button - there also can be a way of doing that.
Please describe the requirements and we can talk about the possible solution for your case

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
jusWest
User
Posts: 150
Joined: Fri Aug 24, 2018 8:26 am

Re: cancel cmd.newDocCombine process

Post by jusWest »

thank you.

our requirement is to be able to detect when the cancel button is clicked.

Regards
Ronny
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: cancel cmd.newDocCombine process

Post by Sasha - Tracker Dev Team »

Hello jusWest,

Here's a code snippet that should work in the FullDemo application:

Code: Select all

if (e.nEventID == nIDS[(int)IDS.e_operExecuted])
{
	PDFXEdit.IOperation oper = (PDFXEdit.IOperation)e.pFrom;
	int opID = pdfCtl.Inst.Str2ID("op.combineDocs", false);
	if (oper.ID == opID)
	{
		uint hres = e.pEvent.Param1; //0x821a04c7 - USER_CANCELED
		if (hres == 0x821a04c7)
		{
			//Canceled by user
		}
	}
}
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply