Jump to content

Recommended Posts

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
Posted

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

Posted

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

Am i doing something wrong?

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

Posted

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>

Posted

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.

Posted

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...