dazza Posted May 26, 2009 Posted May 26, 2009 Dear Bods,How do I do a _GUICtrlMenu_GetItemSubMenu from a sub-sub menu?If an application has a menu of:File | Edit | View | Report | HelpAnd Report has:Report1 | Report2 | Report3And Report2 has:Report2a | Report2b | Report 2cHow do I get the state/name of Report2b?So far my code is:$hWnd = WinGetHandle("Window name") $hMenu = _GUICTRLMenu_GetMenu($hWnd) $hReports = _GUICTRLMenu_GetItemSubMenu($hMenu, 4) $data = _GUICTRLMenu_GetItemText($hReports, 2)
James Posted May 27, 2009 Posted May 27, 2009 Make sure that Report2 has a variable name assigned to it: $Report2 = GuiCtrlCreateMenu($Report, "Report 2") Then all you need to do is call, _GUICtrlMenu_GetItemSubMenu like so: _GUICtrlMenu_GetItemSubMenu($Report2, 2) That should work? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
dazza Posted May 29, 2009 Author Posted May 29, 2009 Make sure that Report2 has a variable name assigned to it: $Report2 = GuiCtrlCreateMenu($Report, "Report 2") Then all you need to do is call, _GUICtrlMenu_GetItemSubMenu like so: _GUICtrlMenu_GetItemSubMenu($Report2, 2) That should work? Many thanks
James Posted May 29, 2009 Posted May 29, 2009 No problem, hope that helps. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now