I need a code to find controls on a window.
Problem is there are two RichEdit20A's on a window and I can only find one of them.
hwndxyz is the window's main handle.
hwndedit1 := FindWindowEx(hwndxyz, 0, 'RichEdit20A', nil);
That's the first RichEdtit20A, now to find the other one, I tried the following.
hwndedit2 := FindWindowEx(hwndxyz, hwndedit1, 'RichEdit20A', nil);
Now, both handles are not empty, so it found both textboxes. Problem is that only the first returns text but the second handle returns nothing.
SendMessage(hwndedit1, WM_SETTEXT, 0, integer(xyz)); = text.
SendMessage(hwndedit2, WM_SETTEXT, 0, integer(xyz)); = empty, while it should return text.
I guess it didn't find the second RichEdit20A after all, so do you know a way to find the second richedit20a?