#include once "window9.bi"

Function OpenSubMenu(ByVal menu As HMENU, ByRef sName As USTRING) As HMENU Export
	Var hPopUp = CreatePopupMenu()
	#ifdef UNICODE
		InsertMenu(menu , -1, MF_POPUP, cast(UINT_PTR, hPopUp), *sName )
	#else	
		InsertMenu(menu , -1, MF_POPUP, cast(UINT_PTR, hPopUp), sName )
	#EndIf
	Return hPopUp
End Function
