I want to create the same "Find windows ..." function for spy ++ in C #. I tried using this WINAPI function:
HWND WINAPI WindowFromPoint(__in POINT Point);
http://msdn.microsoft.com/en-US/library/ms633558.aspx But I did not come to get all the elements because they are disabled or hidden.
For example, with a window 7 calculator in programming mode, I cannot get "ABCDEF", with my program, if they are disabled, then spy ++ can get it.
Edit: I tried this, but it does not work:
[DllImport("user32.dll")] public static extern ulong GetClassLongPtr(IntPtr hWnd, int nIndex); [DllImport("user32.dll")] public static extern IntPtr ChildWindowFromPointEx(IntPtr hWndParent, Win32Point pt, uint uFlags); IntPtr hWnd = WindowFromPoint(myPoint); hWnd= ChildWindowFromPointEx(hWnd , myPoint, 0x0000);
myPoint is the position of my mouse.
I am not familiar with WINAPI, and I present with your explanation that this is a lack of understanding of me. Is it possible to have a small example of the ChildWindowFromPointEx function or find out that my code is not working? thanks for your reply
I am trying to create a loop, but it looks like the descriptor is under a different descriptor, but is not a child of the descriptor, the loop always sends the same descriptor, not the child of the desire, when the "abcdef" key is disabled. Do you have another idea?