Page History
...
The UserData parameter is added for convenience. This is useful for passing something unique to this control so that you can have a generic event handler make certain decisions. A table control might pass a cell coordinate and a hyperlink control might pass a string indicating it's type. It doesn't really affect the operation of the context menu; it's just for your convenience.
Example
Code Block |
---|
// Show a context menu with Paste disabled since the clipboard is empty
Menu = ""
Menu<-1> = "CUT" :@VM:"Cut" :@VM:1
Menu<-1> = "COPY" :@VM:"Copy" :@VM:1
Menu<-1> = "PASTE" :@VM:"Paste" :@VM:0 ; // Disabled
Menu<-1> = "" ; // Separator
Menu<-1> = "ZOOMIN" :@VM:"Zoom In" :@VM:1
Menu<-1> = "ZOOMOUT":@VM:"Zoom Out":@VM:1
Send_Message(Ctrl, "OLE.ShowContextMenu", "10,10", Menu, "My Special Data") |
...