Context menu

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

Rad1
User
Posts: 108
Joined: Wed May 13, 2009 2:21 pm

Context menu

Post by Rad1 »

Hello,

How can I deny one context menu, and let others enabled ?

I know I can disable all context menu. But I need to enable one when I use markup and commenting tools.

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

Re: Context menu

Post by Corwin - Tracker Sup »

You will be able to do this in new build due in the coming days. Thanks for your patience
johnnyjoe
User
Posts: 35
Joined: Thu Nov 26, 2009 3:14 am

Re: Context menu

Post by johnnyjoe »

Corwin - Tracker Sup wrote:You will be able to do this in new build due in the coming days. Thanks for your patience
Hello,

May i know are the new build will coming on when? so that i can able to do as below?

How can I deny one context menu, and let others enabled ?

I know I can disable all context menu. But I need to enable one when I use markup and commenting tools.

Thanks.
User avatar
Lzcat - Tracker Supp
Site Admin
Posts: 677
Joined: Thu Jun 28, 2007 8:42 am

Re: Context menu

Post by Lzcat - Tracker Supp »

Hi,

In the current version of Viewer you need to react on PXCVA_OnNamedNotify. If you receive "Notifications.ContextMenu" in "Name" parameter then some context menu is being shown.

To get the context menu name you can read the "Notifications.ContextMenu.MenuName" property.

Co-ordinates of a popup are stored in the "Notifications.ContextMenu.x" and "Notifications.ContextMenu.y".

To deny showing this context menu you can specify this in the property: "Notifications.ContextMenu.UserChoice". This property can be set to:
"Default" or 0 - this will show the standard context menu.

"Skip" or "Deny" or -1 - this will deny showing the standard context menu.
Command name or Command ID - you can also specify command, which you want to run instead of context menu.

Here is a 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 
Hope that helps
Victor
Tracker Software
Project manager

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