Suzuran Posted June 17, 2007 Posted June 17, 2007 I want to make a menu with icons. What am I doing wrong in the next code:#include <GUIConstants.au3> GUICreate("Title",500,300) $EditMenu = GUICtrlCreateMenu('&Edit') $PrefsItem = GUICtrlCreateMenuItem('Preferences', $EditMenu, 'shell32.dll', 21) $FavItem = GUICtrlCreateMenuItem('Favorites', $EditMenu, 'shell32.dll', 43) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEndI don't really get it how to use what Holger did here: http://www.autoitscript.com/forum/index.ph...=20967&st=0
star2 Posted June 17, 2007 Posted June 17, 2007 (edited) Credit goes to Holgerthanks to Holger for the greate jobthis is your example#include <Menu_Icons.au3> GUICreate("Test",150,100) $EditMenu = GUICtrlCreateMenu('&Menu') $ss = MY_GUICtrlCreateMenu ("Settings" , $EditMenu, "shell32.dll" , 165) $panel = MY_GUICtrlCreateMenuItem('Control Panel', $ss, 'shell32.dll', 216) $Desk = MY_GUICtrlCreateMenuItem('Desktop Display Settings', $ss, 'shell32.dll', 140) $Forums = MY_GUICtrlCreateMenuItem('AutoIt Forums', $EditMenu, 'shell32.dll', 43) $exit = MY_GUICtrlCreateMenuItem ("Exit" , $EditMenu , "shell32.dll" , 215) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $exit Exit Case $msg = $panel Run ("control.exe") Case $msg = $Desk Run ("control.exe desk.cpl") Case $msg = $Forums ShellExecute ("http://www.autoitscript.com/forum/index.php?") EndSelect WEndDon't forget to put attachment files in the Include Dir Edited June 17, 2007 by star2 [quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]
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