#include ONCE "window9.bi"

sub CreateIconItemMenu (titleMenu as Hmenu , iNumberMenu as Long , IDimage as HBITMAP) 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(hwnd , pListTemp->anyTwoData)	
	
	dim as any ptr plastImage = gtk_image_menu_item_get_image(GTK_IMAGE_MENU_ITEM(itemMenu))
	
	if plastImage then
		
		gtk_widget_destroy(plastImage)
		
	EndIf
	
	gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(itemMenu), gtk_image_new_from_pixbuf(IDimage))
	
End Sub