In VB6, I need to dynamically create submenus which themselves have submenus so as to achieve something like :
Recent Doc 1
Recent Doc 2
etc depending on how many docs (or whatever) found
I can create the first level (Recent Doc x) easily using the InsertMenuItem API and sub-class to detect when it's clicked but I can't get a handle to it from GetSubMenu so as to be able to insert the next level (Open / Print etc). Thus,
InsertMenuItem ByVal l_hFileMenu, ByVal 1, ByVal True, l_uMenuInfo
l_hSubMenu = GetSubMenu(ByVal l_hFileMenu, ByVal 0)
l_hSubMenu always is returned as zero regardless of the value of the position parameter.
Any advice would be much appreciated.