471,326 Members | 2,490 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,326 software developers and data experts.

MSAA in C#

Hi!

I'm currently developing an application that tries to emulate the
functionality of AccExplorer, that is, get the IAccessible object of the
control currently under the mouse pointer. I've made some progress and am
able to get the IAccessible objects of certain controls (windowbar,
scrollbars, icons on the desktop, icons in the taskbar etc) while others
return a wierd, undocumented error number (-2147417843). The objects that
are returning the error number are buttons, buttons in containers,
textfields and more.

Here is my code:

public static bool ControlAtPoint(Point point)
{
IAccessible acc = null;
object childID;

int error = AccessibleObjectFromPoint(point, out acc, out
childID);
Debug.WriteLine("checking at: " + point.ToString());
Debug.WriteLine("acc: " + error);

if (acc != null)
{
int left, top, width, height;
acc.accLocation(out left, out top, out width, out height,
childID);
Debug.WriteLine("object@" + left + "," + top + ":" + (left +
width) + "," + (top + height));
Debug.WriteLine("object name: " + acc.get_accName(childID));
return true;
}

return false;
}

Any takers on what the error might be?
Feb 7 '06 #1
0 2193

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Mythili Madhav | last post: by
reply views Thread by Chougule Vinay | last post: by
reply views Thread by Ulf | last post: by
8 posts views Thread by Pete Davis | last post: by
1 post views Thread by jonsolo11 | last post: by
1 post views Thread by krishnakant Mane | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.