Sign in to follow this  
Followers 0
Juvigy

Paint a GUI Menu?

12 posts in this topic

#1 ·  Posted (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 by Juvigy

Share this post


Link to post
Share on other sites



Bump

Share this post


Link to post
Share on other sites

10x - i tried to search but couldnt find anything.

My search parameters are not always the right one:)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

I re downloaded your file and started the sample again but still there is no color to the menu.

Am i doing something wrong?

Share this post


Link to post
Share on other sites

#8 ·  Posted (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 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

Share this post


Link to post
Share on other sites

10x

_GUIMenuBarSetBkColor($hParentGUI, $Color) - that fixed it:)

Share this post


Link to post
Share on other sites

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>

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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!"

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0