本文整理汇总了C++中QWindowsAccessible类的典型用法代码示例。如果您正苦于以下问题:C++ QWindowsAccessible类的具体用法?C++ QWindowsAccessible怎么用?C++ QWindowsAccessible使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了QWindowsAccessible类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: showDebug
/*
IAccessible
*/
HRESULT STDMETHODCALLTYPE QWindowsAccessible::accHitTest(long xLeft, long yTop, VARIANT *pvarID)
{
showDebug(__FUNCTION__, accessible);
if (!accessible->isValid())
return E_FAIL;
int control = accessible->childAt(xLeft, yTop);
if (control == -1) {
(*pvarID).vt = VT_EMPTY;
return S_FALSE;
}
QAccessibleInterface *acc = 0;
if (control)
accessible->navigate(Child, control, &acc);
if (!acc) {
(*pvarID).vt = VT_I4;
(*pvarID).lVal = control;
return S_OK;
}
QWindowsAccessible* wacc = new QWindowsAccessible(acc);
IDispatch *iface = 0;
wacc->QueryInterface(IID_IDispatch, (void**)&iface);
if (iface) {
(*pvarID).vt = VT_DISPATCH;
(*pvarID).pdispVal = iface;
return S_OK;
} else {
delete wacc;
}
(*pvarID).vt = VT_EMPTY;
return S_FALSE;
}
示例2: QWindowsAccessible
IAccessible *qt_createWindowsAccessible(QAccessibleInterface *access)
{
QWindowsAccessible *acc = new QWindowsAccessible(access);
IAccessible *iface;
acc->QueryInterface(IID_IAccessible, (void**)&iface);
return iface;
}
示例3: showDebug
HRESULT STDMETHODCALLTYPE QWindowsAccessible::get_accParent(IDispatch** ppdispParent)
{
#ifdef DEBUG_SHOW_ATCLIENT_COMMANDS
showDebug(__FUNCTION__, accessible);
#endif //DEBUG_SHOW_ATCLIENT_COMMANDS
if (!accessible->isValid())
return E_FAIL;
QAccessibleInterface *acc = 0;
accessible->navigate(Ancestor, 1, &acc);
if (acc) {
QWindowsAccessible* wacc = new QWindowsAccessible(acc);
wacc->QueryInterface(IID_IDispatch, (void**)ppdispParent);
if (*ppdispParent)
return S_OK;
}
*ppdispParent = 0;
return S_FALSE;
}