While working on Automating Infragistics UltraTree management in a C # Winforms application, I discovered that UltraTree implemented an AccessibleObject (MSAA) model. I was able to successfully capture the IAccessible interface by putting hwnd captured from spy ++ in
IAccessible* accessibleObject;
AccessibleObjectFromWindow(hwnd, OBJID_CLIENT, IID_IAccessible, (void**)&accessibleObj);
The problem is that when I call now
long childCount;
accessibleObj->get_accChildCount(&childCount);
The result that I will return is zero. From a look at the source code of UltraTree, I noticed that its implementation of the child account should not return zero (checked with windbg to check the fields used in the internal code). All other MSAA functions work correctly (for example, "accLocation").
I'm at a dead end why this is so. I also tried using "IEnumVARIANT", but also did not find children, although the tree has 25 items in the collection that get_accChildCount uses. I have not yet tried to find out if the Microsoft story was able to identify the children, since there is no sound card on the machine, but I hope that I will set up this attempt soon. I suppose the narrator will find children, and there is some strange trick that I miss.
source
share