Juvigy Posted October 30, 2009 Posted October 30, 2009 (edited) I have a GUI and a menu created with GUICtrlCreateMenu() Is there a way to use a custom color for it? GUICtrlSetColor and GUICtrlSetBkColor dont support menus. Edited October 30, 2009 by Juvigy
Zedna Posted November 2, 2009 Posted November 2, 2009 Next time try to search ;-) GUI/Tray Menu with icons and colors - UDF from Holger http://www.autoitscript.com/forum/index.php?showtopic=20967&hl=modernmenu&st=0 Resources UDF ResourcesEx UDF AutoIt Forum Search
Juvigy Posted November 2, 2009 Author Posted November 2, 2009 10x - i tried to search but couldnt find anything. My search parameters are not always the right one:)
Juvigy Posted November 2, 2009 Author Posted November 2, 2009 Checked it out - it is nice but i dont seem to find how to do it for the MENU itself not just the menu items.
ProgAndy Posted November 2, 2009 Posted November 2, 2009 Try this: http://www.autoitscript.com/forum/index.php?showtopic=20967&view=findpost&p=563176 *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes
Juvigy Posted November 2, 2009 Author Posted November 2, 2009 I re downloaded your file and started the sample again but still there is no color to the menu. Am i doing something wrong?
ProgAndy Posted November 2, 2009 Posted November 2, 2009 (edited) you have to create the items in the menubar with _GUICtrlCreateODTopMenu The background-color of the rest of the bar is set with _GUIMenuBarSetBkColor($hParentGUI, $Color). ($color: maybe BGR instead of RGB, i do not remember) Edited November 2, 2009 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes
Juvigy Posted November 2, 2009 Author Posted November 2, 2009 10x _GUIMenuBarSetBkColor($hParentGUI, $Color) - that fixed it:)
Juvigy Posted November 2, 2009 Author Posted November 2, 2009 After playing a while o got some errors: C:\ModernMenuRaw.au3(133,77) : ERROR: $WM_MOUSEMOVE previously declared as a 'Const' If Not IsDeclared("WM_MOUSEMOVE") Then Global Const $WM_MOUSEMOVE = 0x0200 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\ModernMenuRaw.au3(135,77) : ERROR: $WM_LBUTTONUP previously declared as a 'Const' If Not IsDeclared("WM_LBUTTONUP") Then Global Const $WM_LBUTTONUP = 0x0202 If i remove those 2 lines from ModernMenuRaw.au3 my thing works , but i receive error in the sampleguiandtray.au3 that they are not defined. I think they are included in another of the includes i am using. Which one? #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <TreeViewConstants.au3> #include <StaticConstants.au3> #include <Array.au3> #include <Misc.au3> #Include <String.au3> #include <Excel.au3>
Authenticity Posted November 2, 2009 Posted November 2, 2009 Those are defined in WindowsConstants.au3 but the condition is if they are not define which is weird. The condition appears in ProgAndy's UDF library but not in WindowsConstants.au3 so try to include ModernMenuRaw.au3 after WindowsConstants.au3.
GEOSoft Posted November 2, 2009 Posted November 2, 2009 Holgers script goes back to the days before those constants were in WindowsConstants.au3. Just comment out the offending lines in the script. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
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