I have a document management application in VB6 running on NT4 SP6. I embed an instance of Word in my VB form using the SetParent API and disable its system menu so that I have full control of size, position, etc. I also want to get at its user menu so as to control what the user can do depending on her/his security settings. In Word, the menu is on a floating bar that is a child window. While I can see the window using EnumChildWindows API, I cannot detect the menu handle with GetMenuBarInfo. My callback function from EnumChildWindows includes the line :
l_lReturnValue = GetMenuBarInfo(ByVal hWndWindow, ByVal OBJID_MENU, ByVal 0, l_uMenuBarInfo)
but l_uMenuBarInfo always comes back empty.
OBJID_MENU is a constant &HFFFFFFFD (decimal -3).
Any suggestions would be appreciated.
(Incidentally, I also want to do this with Excel and possibly other apps so I am looking for a generic solution).
l_lReturnValue = GetMenuBarInfo(ByVal hWndWindow, ByVal OBJID_MENU, ByVal 0, l_uMenuBarInfo)
but l_uMenuBarInfo always comes back empty.
OBJID_MENU is a constant &HFFFFFFFD (decimal -3).
Any suggestions would be appreciated.
(Incidentally, I also want to do this with Excel and possibly other apps so I am looking for a generic solution).