Click here to Skip to main content
15,886,578 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
he code below gives me all elements of any window but i want to know the particular button/link/textbox accessed by user ...

Java
User32.INSTANCE.EnumChildWindows(GetForegroundWindow(),
                    new User32.WNDENUMPROC() {
                        int count = 1;

                        public boolean callback(HWND hWnd, Pointer userData) {
                            byte[] textBuffer = new byte[512];
                            User32.INSTANCE.GetClassNameA(hWnd, textBuffer, 512);

                            byte[] childBuffer = new byte[512];
                            User32.INSTANCE.GetWindowTextA(hWnd, childBuffer, 512);
                            return true;
                        }
                    }, null);
Posted
Comments
TorstenH. 23-Oct-13 6:52am    
Do you have access to the Components?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900