Problems overriding IAccessible::get_accName in MFC application
I'm currently working on a legacy MFC application undergoing a major upgrade. One of the things we're changing is how we test this. We want to create GUI automation tests for the application, and to that end, we're using UI spy to inspect the visual elements, pull out automation names and IDs and help us write our tests. However, unfortunately, a lot of elements (ie tree items, text boxes) don't have automation names associated with them, and we'd like to add them. From what I've been able to find by googling around, overriding CWnd::get_accName should allow us to associate accessibility API names with the elements, but when I override it, nothing changes and I can't see the newly assigned name. 开发者_运维百科 Have I missed something ? Can somebody please point me in the right direction for adding accessibility information to an MFC application ?
Ensure you are calling EnableActiveAccessibility()
in the CWnd-derived class constructor.
精彩评论