Jump to content
Sign in to follow this  
tweakster2010

_GuiCtrlMenu_CheckMenuItem

Recommended Posts

tweakster2010

Hey All,

 

I am having an issue getting checkmenuitem to check the box. The Example works but when i mirror its use or parts of the use it does not work. Here is what I have but my question is am I not using enough of the example for that particular portion to work?

$UI = GUICreate("UI", 301, 506, 1165, 157)

$FileMenu = GUICtrlCreateMenu("&File")

$FileItemInstall = GUICtrlCreateMenuItem("&Installations", $FileMenu)

GuiSetState(@SW_SHOW)

_GUICtrlMenu_CheckMenuItem($FileMenu,1)

I have tried it with $filemenu and with $fileiteminstall and 0/1 and with filemenu,fileiteminstall.

 

Everywhich way I go to use it I cant get it to work. Any help is totally appreciated. :)

Share this post


Link to post
Share on other sites
tweakster2010

that works perfect, but i dont get why the example doesnt use that? The index 0 i did use just was missing the guitrlgethandle i guess. Just missing why. Thanks a bunch though! :)

Share this post


Link to post
Share on other sites
ahmet

Because example does not use menu created with GUICtrlCreateMenu, which returns controlID, while _GUICtrlMenu_CreateMenu used in example returns handle of menu, and all functions starting with _GUICtrlMenu expect menu handle.

Share this post


Link to post
Share on other sites
tweakster2010

Thank you for the explanation. Much appreciated :)

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  

×