views:

39

answers:

2

Hello,

Is there any way to uniquely identify controls using Accessibility? Once control is identified - I should be able to get its current position on screen (rectangle). Tried to do this with IAccIdentity, but don't know what to do with that string of bytes which it returns - is there any way I can extract necessary information from it (or obtain IAccessible using this string)

Thanks.

A: 

It seems like the only way to achieve this is to create internal cache of IAccessible interfaces.

Alex
+1  A: 

Is this identity supposed to last across multiple invocations of the process? For the lifetime of a control its HWND is a unique identifer.

OTOH, controls can be moved around the screen like any child window -- either moved relative to the parent or the parent may move taking the child with it. They can be created and destroyed dynamically as well, although that's less common.

Ben Voigt