I need the VB6 code that will be able to read the highlighted text from a popup menu generated by a separate application.

This type of menu can be located using the following code.
‘Begin code
Declare Function GetDesktopWindow Lib "User32" () As Long

Declare Function FindWindowEx Lib "User32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long

Hwnd = FindWindowEx(GetDesktopWindow(), ByVal 0&, "#32768", vbNullString)

‘end code

What I need is a function that I can send the Hwnd for the menu to, and have it return the text of the selected item if any item is selected.

Ideally, the function would return all text from the menu but must be able to determine which item is selected.

Popup menus do not seem to respond to normal menu calls, such as GetMenuItemCount, GetMenuItemInfo . Can't use the mouse, this is an automation project.