set StdCursor!!

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
Audros
User
Posts: 77
Joined: Fri Jun 08, 2018 1:39 pm

set StdCursor!!

Post by Audros »

Hello,
we have developed own commands in pdf xchange editor and I need to change the default cursor "stdcursor" to Cross.
in the guide I found the setStdCursor function in the sdk, but in the C # code, I can not find it in the IUIX_Inst object.
Can u help us?
Best regard
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17818
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: set StdCursor!!

Post by Tracker Supp-Stefan »

Hello Audros,

I've asked my collleagues in the dev team to take a look here and we will post some further advise shortly!

Regards,
Stefan
Audros
User
Posts: 77
Joined: Fri Jun 08, 2018 1:39 pm

Re: set StdCursor!!

Post by Audros »

Hello
Thanks.
Best regard
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17818
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: set StdCursor!!

Post by Tracker Supp-Stefan »

Hello Audros,

Please take a look at these C# samples:
https://github.com/tracker-software/PDF ... ter/CSharp

And this is the method you should implement:
https://sdkhelp.pdf-xchange.com/vi ... tStdCursor

The values you can use are listed here:
https://sdkhelp.pdf-xchange.com/vi ... _StdCursor

Regards,
Stefan
Audros
User
Posts: 77
Joined: Fri Jun 08, 2018 1:39 pm

Re: set StdCursor!!

Post by Audros »

Hello
i search SetStdCursor in this project but i don't find it.
Best regard
Attachments
screenshot.png
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17818
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: set StdCursor!!

Post by Tracker Supp-Stefan »

Hello Audros,

Please try with the following:

Code: Select all

Parent.uiInst.SetCursor(Parent.uiInst.GetCursorID("cross"));
Regards,
Stefan
Audros
User
Posts: 77
Joined: Fri Jun 08, 2018 1:39 pm

Re: set StdCursor!!

Post by Audros »

Hello,
We already use that, it changes the cursor totaly, but we want just to change standard cursor, and let the cursor change when we pass over annotation, like with callout for example, when we activate it, we have cross look when we point to an empty slot in the pdf.

the code we tried are
uiInst.SetCursor(frm.uiInst.GetCursorID("cross"));
pEvent.Handled = true;


or
uiInst.SetCursor(frm.uiInst.GetCursorID("cross"));

frm.uiInst.LockCursor().
Thanks
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17818
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: set StdCursor!!

Post by Tracker Supp-Stefan »

Hello Audros,

Please take a look here:
Additional explanation for custom event handlers

For some further guidance.

Regards,
Stefan
Audros
User
Posts: 77
Joined: Fri Jun 08, 2018 1:39 pm

Re: set StdCursor!!

Post by Audros »

Thank you,
i get a look on it before, the problem is that When a user clicks on a button the cursor should change to the cross (like when you click a tool). But when we fly over an area the text for example put in the pdf, we need that the cursor changes its appearance, as it is implementer in your annotations;
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: set StdCursor!!

Post by Sasha - Tracker Dev Team »

Hello Audros,

As the cursor is being changed on the MouseMove event, you will have to monitor by yourself, whether you are over something or not.
These methods will prove useful.
IPXC_PageText::HitTest
IPXV_PagesView::GetAnnotFromPt
IPXV_PagesView::GetLinkFromPt
Also, you may want to make your own HitTestContentItem method to handle all of the Content Items correctly. For this one, you will have to run through all of the content and see, whether the IPXC_ConentItem has a Bound Box that intersects with current mouse position point.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Audros
User
Posts: 77
Joined: Fri Jun 08, 2018 1:39 pm

Re: set StdCursor!!

Post by Audros »

Hello,
Ok thank you, we success to do that :)

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

Re: set StdCursor!!

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Audros
User
Posts: 77
Joined: Fri Jun 08, 2018 1:39 pm

Re: set StdCursor!!

Post by Audros »

Hello,
One more question, please, how can we know if the mouse is on content pdf or on cmdbar zone
Best regards
Attachments
Sans titre.png
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: set StdCursor!!

Post by Sasha - Tracker Dev Team »

Hello Audros,

If you are catching the event via the PagesView's object event handler, then your mouse is there.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Audros
User
Posts: 77
Joined: Fri Jun 08, 2018 1:39 pm

Re: set StdCursor!!

Post by Audros »

Hello,
Ah ok, i see that, thank you
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: set StdCursor!!

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply