INFO: Cannot Determine Whether Menu Has Submenu Using MSAA (195253)



The information in this article applies to:

  • Microsoft Platform Software Development Kit (SDK) 1.0, when used with:
    • Microsoft Windows 95
    • Microsoft Windows 98

This article was previously published under Q195253

SUMMARY

There is no foolproof way to determine if a menu has an associated submenu using Microsoft Active Accessibility (MSAA).

MORE INFORMATION

If a menu item has an IAccessible object of its own, you can use the get_accChildCount method of the IAccessible interface to return the number of children it has. If the number of children is one or more, it has a pop- up menu associated with it.

However, menu items are usually children of the menu and they do not have their own IAccessible objects. Moreover, most applications expose menu items as leaf children of the menu. This results in the menu items reporting zero children when you use the get_accChildCount method.

For example, Microsoft Word exposes each of its menu items with their own IAccessible objects. As a result, it is possible to find out if a menu in Word has a submenu.

On the other hand, under Windows 95 with Internet Explorer 4.0, the Start Menu fails to expose its menu items, which makes it impossible to determine if its menu items have an associated pop-up menu. This also occurs under Internet Explorer 4.0.

REFERENCES

Microsoft Active Accessibility

Modification Type:MinorLast Reviewed:7/11/2005
Keywords:kbAAcc kbClient kbinfo kbNavigation KB195253