Retrieve MenuBar object from inside control event handler

Discuss the future of the AutoHotkey language
User avatar
kczx3
Posts: 563
Joined: 06 Oct 2015, 21:39

Retrieve MenuBar object from inside control event handler

27 Apr 2018, 11:18

I am trying to gain access to the MenuBar object of a GUI which is the parent of a button control. I am probably doing something wrong or misread/missed something in the documentation.

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

User avatar
Flipeador
Posts: 780
Joined: 15 Nov 2014, 21:31
GitHub: Flipeador
Location: Argentina
Contact:

Re: Retrieve MenuBar object from inside control event handler

27 Apr 2018, 11:57

it seems like a bug...

Code: [Select all] [Expand] [Download] (Untitled.ahk)GeSHi © Codebox Plus



Edit: Maybe the problem is here:

Code: [Select all] [Download] (script_gui.cpp)GeSHi © Codebox Plus

		case P_MenuBar:
{
if (IS_INVOKE_SET)
{
ResultType result = SetMenu(*aParam[0]);
if (result != OK)
return result; // Already displayed error.
}
_o_return_empty; // TODO
}

It seems like not implemented. :shock:
Windws 1♂ Pro 64-Bits I make scripts for AHKv2 (my v2 compiler) & WIN_7+ Spanish Argentina SublimeText 3 & AHKv2
lexikos
Posts: 5939
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: Retrieve MenuBar object from inside control event handler

04 May 2018, 21:38

I forgot to post here after releasing v2.0-a095 to let you know it's fixed, and it was also missing from the announcement topic. The fix was actually the first change after v2.0-a094.
User avatar
kczx3
Posts: 563
Joined: 06 Oct 2015, 21:39

Re: Retrieve MenuBar object from inside control event handler

07 May 2018, 07:12

Awesome, thanks! Apologies for not specifying which version I was using at the time of the OP. Will make sure I include that for any future posts.

Return to “AutoHotkey v2 Development”

Who is online

Users browsing this forum: No registered users and 1 guest