Context menu does not fire event

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

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

anti_g
User
Posts: 22
Joined: Thu Apr 02, 2009 9:55 am

Context menu does not fire event

Post by anti_g »

Hi,

I am trying to manipulate the context menu, but I don't get the event after the right button click.
is it the PXCVA_OnDisplayContextMenu type? It does not work for some reason.
What do I do wrong?

Thanks,
Anton.
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Context menu does not fire event

Post by Corwin - Tracker Sup »

Sorry, it looks like a bug. This problem will be fixed in the next build - we are hoping this will be approx 10 days or so.
anti_g
User
Posts: 22
Joined: Thu Apr 02, 2009 9:55 am

Re: Context menu does not fire event

Post by anti_g »

The new Build 42 is out, is the problem with the context menu solved? Does not look like this to me...
By the way, where can I find the Release notes for the new build, a list of bug-fixes or something like that?
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Context menu does not fire event

Post by Corwin - Tracker Sup »

Sorry, I was sure that this problem was fixed. We will fix this as soon as possible.
Thanks.

History of changes for Viewer and Viewer ActiveX can be found here:
https://www.pdf-xchange.com/home/pr ... r/history/
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Context menu does not fire event

Post by Corwin - Tracker Sup »

Hello Anton.
In new technical build, context menu event was fully changed.
In new version you need to react on PXCVA_OnNamedNotify. If you receive "Notifications.ContextMenu" in "Name" parameter then some context menu is being to show.
To get context menu name you can read "Notifications.ContextMenu.MenuName" property.
Coordinates of popup is stored in "Notifications.ContextMenu.x" and "Notifications.ContextMenu.y".
To deny showing this context menu you can specify next property: "Notifications.ContextMenu.UserChoice". This property can be set to next values:
"Default" or 0 - this will show standard context menu
"Skip" or "Deny" or -1 - this will deny showing standard context menu.
Command name or Command ID - you can also specify command, which you want to run instead of context menu.

Here is small sample for VB6:

Code: Select all

Private Sub CoPDFXCview1_OnEvent(ByVal nType As Long, ByVal Name As String, ByVal DataIn As Variant, DataOut As Variant, ByVal flags As Long)
    If nType = PXCVA_EventTypes.PXCVA_OnNamedNotify Then
        If Name = "Notifications.ContextMenu" Then
            Dim vDataOut As Variant
            
            Call CoPDFXCview1.GetProperty("Notifications.ContextMenu.MenuName", vDataOut, 0)
            MsgBox vDataOut
            Call CoPDFXCview1.SetProperty("Notifications.ContextMenu.UserChoice", "Skip", 0)
        End If
    End If
End Sub
anti_g
User
Posts: 22
Joined: Thu Apr 02, 2009 9:55 am

Re: Context menu does not fire event

Post by anti_g »

Sorry, Corwin, it does not work in the tech build either. :(
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Context menu does not fire event

Post by Corwin - Tracker Sup »

All works fine for me. Are you sure that you have correctly installed technical build?
Please, replace your PDFXChange Viewer files by files from PDFXCview.tech_build.zip archive and then register it's components by running next commands:
1) PDFXCView.exe /RegServer
2) regsvr32 PDFXCviewAx.dll
HTH
anti_g
User
Posts: 22
Joined: Thu Apr 02, 2009 9:55 am

Re: Context menu does not fire event

Post by anti_g »

Yes, my fault! Works fine, thanks!
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: Context menu does not fire event

Post by John - Tracker Supp »

Excellent - pleased all is well ;)
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com