小编Joh*_*ers的帖子

有没有办法让 MSAA IAccessible 遍历更快?

现在我有这个 C++ 函数(删除了安全检查和一些代码以使其更具可读性):

\n\n
HRESULT WalkTreeWithAccessibleChildren(wstringstream *ss, IAccessible* pAcc, int depth)\n{\n\xc2\xa0 \xc2\xa0 long childCount;\n\xc2\xa0 \xc2\xa0 long returnCount;   \n\n\xc2\xa0 \xc2\xa0 VARIANT* pArray = new VARIANT[childCount];\n\xc2\xa0 \xc2\xa0 hr = AccessibleChildren(pAcc, 0L, childCount, pArray, &returnCount);\n\xc2\xa0 \xc2\xa0 for (int x = 0; x < returnCount; x++) {\n\xc2\xa0 \xc2\xa0 \xc2\xa0 \xc2\xa0 VARIANT vtChild = pArray[x];\n        Get the role and name of the component here\n\xc2\xa0 \xc2\xa0 \xc2\xa0 \xc2\xa0 // If it's an accessible object, get the IAccessible, and recurse.\n\xc2\xa0 \xc2\xa0 \xc2\xa0 \xc2\xa0 if (vtChild.vt == VT_DISPATCH) …
Run Code Online (Sandbox Code Playgroud)

c++ winapi msdn accessibility

5
推荐指数
1
解决办法
1063
查看次数

标签 统计

accessibility ×1

c++ ×1

msdn ×1

winapi ×1