Differentiate between a Save and Save As Event

PDF-XChange Editor SDK for Developers

Moderators: Tracker Support, TrackerSupp-Daniel, Paul - Tracker Supp, Chris - Tracker Supp, Vasyl-Tracker Dev Team, Sean - Tracker, Tracker Supp-Stefan, Ivan - Tracker Software

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
coblejesse
User
Posts: 30
Joined: Thu May 16, 2019 7:44 pm

Differentiate between a Save and Save As Event

Post by coblejesse » Tue May 21, 2019 6:52 pm

Hi Tracker,

I found this code in another forum post and it works good in catching the save event on any Save command:

if (e.nEventID == nIDS[(int)IDS.e_document_performSave])
{
//Do your stuff
//...
//If the document should not be saved then we break
{
//...
e.pEvent.Result = 0; //Also we can send the E_FAIL (0 means S_OK) or some other error message so that it would be displayed in the error message box

}
}

But is there a way to differentiate between when a user hits Save and Save As in the file menu?

Thanks,
Jesse

coblejesse
User
Posts: 30
Joined: Thu May 16, 2019 7:44 pm

Re: Differentiate between a Save and Save As Event

Post by coblejesse » Tue May 21, 2019 7:16 pm

Actually I figured this out. I just implemented the PdfEditorCommandHandler that was provided in the following link https://sdkhelp.tracker-software.com/vi ... md_Handler for the cmd.save IUIX_Cmd. That was extremely useful, thanks.

User avatar
Sasha - Tracker Dev Team
User
Posts: 4075
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Differentiate between a Save and Save As Event

Post by Sasha - Tracker Dev Team » Wed May 22, 2019 6:56 am

:)
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

Post Reply