Will the context menu be destroyed when the GUI is destroyed ? I found the following example, each time I re-open Gui2 and right click, its context menu will add a new line at the bottom. Why ?
Code: Select all
Gui, Add, Button,, Open
Gui, Show, h300 w400
return
ButtonOpen:
Gui, 1:-Disabled
Gui, 2:Default
Gui, +Owner1
Gui, Add, ListView, r10 w300, Title
Menu, ContextMenu, Add, Open, Open
Menu, ContextMenu, Add
Menu, ContextMenu, Add, Save, Save
Gui, Show
return
2GuiClose:
Gui, 1:-Disabled
Gui, Destroy
return
2GuiContextMenu:
Menu, ContextMenu, Show
return
Open:
return
Save:
return