#include ONCE "window9.bi"

sub Modify_Menu (iNumberMenu as Long , menu as HMENU  , sTitle as String , iNewNumber as Long = FB_IGNORE, iFlag as Long = 0) export
	
	dim as ListT ptr pListTemp
	
	dim as HMENU itemMenu
	
	pListTemp = cast(ListT ptr,pGlobalTypeWindow9->ListMenus->findNodeFunc(cint(iNumberMenu)))
	
	if pListTemp = 0 then exit sub
	
	itemMenu = cast(HMENU , pListTemp->anyTwoData)
	
	gtk_menu_item_set_label(itemMenu , strptr(sTitle))
	
	if iNewNumber <> 0 andalso iNewNumber <> FB_IGNORE then
		
		g_object_set_data (cast(any ptr, itemMenu), "IDmenu" , cast(any ptr,cast(integer , iNewNumber)))
		
		pListTemp->anyOneData = iNewNumber
		
	EndIf
	
End Sub