Attaching menu to a top-level form
Using FoxTray ActiveX control: System Tray Icon and menu attached to VFP form
Shortcut Menu Class
Adding user-defined items to the Control Menu of VFP form (requires VFP9)
BOOL InsertMenuItem(
HMENU hMenu, // handle to menu
UINT uItem, // identifier or position
BOOL fByPosition, // meaning of uItem
LPCMENUITEMINFO lpmii // menu item information
);
DECLARE INTEGER InsertMenuItem IN user32;
INTEGER hMenu,;
INTEGER uItem,;
INTEGER fByPosition,;
STRING @ lpmii
hMenu [in] Handle to the menu in which the new menu item is inserted.
uItem [in] Identifier or position of the menu item before which to insert the new item. The meaning of this parameter depends on the value of fByPosition.
fByPosition [in] Value specifying the meaning of uItem. If this parameter is FALSE, uItem is a menu item identifier. Otherwise, it is a menu item position.
lpmii [in] Pointer to a MENUITEMINFO structure that contains information about the new menu item.
If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.