我尝试使用Iaccessible接口的accLocation()方法检索一个元素的屏幕位置,但在初始化该方法的参数时遇到了问题
IAccessible *plocation;
long *x;
long *y;
long *width;
long *height;
VARIANT varChild;
varChild.vt = VT_I4;
varChild.iVal = CHILDID_SELF;
hr = pIaccessible->GetIAccessible(&plocation);
hr = plocation->accLocation(x, y, width, height, varChild);但当我运行它时,错误消息如下:
uninitialized local variable 'x'used,
uninitialized local variable 'y'used,
uninitialized local variable 'width'used,
uninitialized local variable 'height'used发布于 2019-08-22 05:30:23
我有一种感觉,你需要使用:
long x;
long y;
long width;
long height;
...
// Pass the addresses of objects where the values can be stored.
hr = plocation->accLocation(&x, &y, &width, &height, varChild);https://stackoverflow.com/questions/57599319
复制相似问题