AnnoAddCustomMenuItem

Usage                  Boolean AnnoAddCustomMenuItem (Menu As LONGLONG, MenuItemName As String, Enabled As Boolean, Checked As Boolean, Value As Long)

Description         This method appends a menu item to the user defiend pop-up menu.

Parameters         Menu          LONGLONG Custom pop-up menu

                            MenuItemName    Long    Name of the menu item. The maximum length is 64 characters.

                            Enabled      Boolean           If this parameter is TRUE, the menu item will be enabled, otherwise the user cannot select this menu item.

                            Checked     Boolean           If this parameter is TRUE, the menu item will be checked.

                            Value          Long    This parameter must be greater than zero. This value identifies the menu item.

Return value      TRUE on success, otherwise FALSE. If any error occurs, you can call the GetLastAnnoError method for the last error code.

Programming Notes        If you create a custom pop-up menu, this menu will be dispayed when you click the right mouse button. So you can change the default pop-up menu in the annotation. If the pMenuName is a “-” character (without quotes) a separator will be appended to the menu. When the user selects a menu item an event will be raised. This event informs the user about the type of the selected annotation object and the selected menu item. For example, if you add a menu item to the menu with name “First Menu” and Value 1. If the user clicks on the “First Menu” in the pop-up menu, the selected menu item information will be 1 in the event sent. If the RetValue 0, the user didn’t select a menu item from the menu.