ptt Posted November 26, 2006 Posted November 26, 2006 I tried to make the menu using GUICtrlCreateMenu only (without using GUICtrlCreateMenuItem).... for example : view1 = GUICtrlCreateMenu("View1"), view2 = GUICtrlCreateMenu("View2") When i use guigetmsg() , and when i try to select either view 1 or view2, it wont return any thing for guigetmsg().....what shoujd i do ? Please help me out.........I really dont wnt to create submenu due to my work has lots of repeated test i dont wnt to click further down to submenu. tx in advanced.
Developers Jos Posted November 26, 2006 Developers Posted November 26, 2006 .....what shoujd i do ? Please help me out.........Show some code maybe ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
ptt Posted November 27, 2006 Author Posted November 27, 2006 $openafile = GUICtrlCreateMenu("OpenFile") $Closeafile = GUICtrlCreateMenu("Close") for example i hve menus above ( those are not GUICtrlCreateMenuItem).....when i click on either , In VB6, it is mnuOpen_click() what is the equivalent code when a menu selected in au3 ?
Rad Posted November 27, 2006 Posted November 27, 2006 GUIGetMsg doesnt return anything with just the menu, you need the sub menus... Also, the menu doesnt return a control ID (via MouseGetPos()) unlike the normal controls
AzKay Posted November 27, 2006 Posted November 27, 2006 This'll probly be the best youll get: $Gui = GUICreate("beef", 100, 100) $Menu = GUICtrlCreateMenu("File") $Open = GUICtrlCreateMenuitem("Open File", $Menu) $Close = GUICtrlCreateMenuitem("Close", $Menu) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $Open FileOpenDialog("Choose a file.", @HomeDrive, "(*.*)") Case $Close Exit EndSwitch Sleep(10) WEnd But what do I know. # MY LOVE FOR YOU... IS LIKE A TRUCK- #
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now