GefContextMenuItem.GetPointTargetAction (method)

Returns True if the menu item is a point target command and retrieves the index
Syntax: Boolean = object.GetPointTargetAction ( PointTargetIndex )
Parameters:
PointTargetIndex As long* -
Description: The GetPointTargetAction method returns True if the menu item is a point target and retrieves the point target index.

Example:

Sub OnPreContextMenu(oContextMenu As GefContextMenu)
  Dim oContextMenuItem As GefContextMenuItem
  Dim oContextMenuItems As GefContextMenuItems
  
  Set oContextMenuItems = oContextMenu.MenuItems
  Dim pointTargetIndex As Long
  
  For Each oContextMenuItem in oContextMenuItems
    If oContextMenuItem.GetPointTargetAction(pointTargetIndex) Then
        If pointTargetIndex = 0 Then
          oContextMenuItem.Enabled = False
        End If
    Else
      Dim command As Long
      If oContextMenuItem.GetNativeCommandAction(command) Then
        If command = gefMenuCommand_ID_EDIT_POINTVIEW Then
          oContextMenuItem.Enabled = False
        End If
      End If
    End If
  Next oContextMenuItem
End Sub