GetMenuItemText and #pb_any doesnt work
Posted: Wed Jun 27, 2012 8:07 am
Hello forum,
the command getmenuitemtext does not work with #pb_any for the menuitem ID.
Here a code:
PB 4.60 windows 7 64
yours Max.
the command getmenuitemtext does not work with #pb_any for the menuitem ID.
Here a code:
Code: Select all
CompilerIf #PB_Compiler_Debugger = 0
MessageRequester( "ERROR" , "Enable Debugger!" , #MB_ICONINFORMATION )
End
CompilerEndIf
OpenWindow ( 0 , 0 , 0 , 200,200,"")
CreateMenu ( 0 , WindowID ( 0 ) )
MenuItem ( 0 , "hallo " )
MenuItem ( #PB_Any , "zusammen" )
Repeat
evt = WaitWindowEvent ()
Select evt
Case #PB_Event_Menu
eventmenu = EventMenu ()
Select eventmenu
Case -1
Default
Debug "ID: " + Str(eventmenu )
Debug " text: " + GetMenuItemText( 0 , eventmenu )
Debug ""
EndSelect
EndSelect
Until evt = #PB_Event_CloseWindow yours Max.