Jump to content

Menu Options


cueclub
 Share

Recommended Posts

Can you change the Font, or color of a Menu Item?

$Menu = GUICtrlCreateMenu("&Menu")
    $MenuItem = GUICtrlCreateMenuItem("Test Menu Item", $Menu)

In the above example, the menu item would be assigned, And after it was assigned it would be given a color or shown in italic.

Not sure exactly how to do it, And I may have missed it searching the forums.

Any help will be appreciated.

Cue

Link to comment
Share on other sites

Okay I ran into a problem with the #include <guimenu.au3>

I keep getting this error

C:\Program Files\AutoIt3\Include\GUIMenu.au3 (556) : ==> Variable used without being declared.:

If $fByPos Then $iByPos = BitOR($iByPos, $MF_BYPOSITION)

If $fByPos Then $iByPos = BitOR($iByPos, ^ ERROR

->13:34:07 AutoIT3.exe ended.rc:1

And All I am trying to do is add this

$Menu = GUICtrlCreateMenu("&Menu")
    $MenuItem = GUICtrlCreateMenuItem("Test Menu Item", $Menu)
_GUICtrlMenu_enableMenuItem($menu, $menuitem, $c1 = 1, $c1a > 0)

Perhaps I have it written wrong.

Link to comment
Share on other sites

Oh well, look at this.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$Form1_1 = GUICreate("Form1", 634, 448, 192, 124)
$MenuItem1 = GUICtrlCreateMenu("&MenuItem1")
$MenuItem2 = GUICtrlCreateMenuItem("MenuItem2", $MenuItem1)
GUICtrlSetState(-1, $GUI_DISABLE)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd
Link to comment
Share on other sites

All you really need is GUICtrlSetStae($MenuItem, 128) or GUICtrlSetStae($MenuItem, $GUI_DISABLE) if you have #included GUIconstantsEx.au3

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

Link to comment
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
 Share

  • Recently Browsing   0 members

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