I have a program window with 2 EDIT boxes. They appear not to be given a resource ID (somehow).
Here is a dump of the one I need from Olly:
004012A7 /$ 6A 00 PUSH 0 ; /lParam = NULL
004012A9 |. FF35 44204000 PUSH DWORD PTR DS:[402044] ; |hInst = 00400000
004012AF |. 6A 00 PUSH 0 ; |hMenu = NULL
004012B1 |. FF75 08 PUSH DWORD PTR SS:[EBP+8] ; |hParent
004012B4 |. 6A 14 PUSH 14 ; |Height = 14 (20.)
004012B6 |. 68 EA000000 PUSH 0EA ; |Width = EA (234.)
004012BB |. 6A 05 PUSH 5 ; |Y = 5
004012BD |. 6A 23 PUSH 23 ; |X = 23 (35.)
004012BF |. 68 00000050 PUSH 50000000 ; |Style = WS_CHILD|WS_VISIBLE
004012C4 |. 6A 00 PUSH 0 ; |WindowName = NULL
004012C6 |. 68 F1204000 PUSH pDBillin.004020F1 ; |Class = "EDIT"
004012CB |. 68 00020000 PUSH 200 ; |ExtStyle = WS_EX_CLIENTEDGE
004012D0 |. E8 3E010000 CALL <JMP.&USER32.CreateWindowExA> ; \CreateWindowExA
From a different application I am trying to send a WM_SETTEXT message to the SECOND edit box.
Since there is no unique ID, how would I do this?
I THINK this will grab the first Edit Box:
invoke FindWindowEx, targethandle, 0, ADDR szEdit, NULL
but...
I need a handle to the SECOND one in the Window.
Is there a way to enumerate through them or something? Or am I again missing an easy solution?
Thanks to all.
Trope
got it.
EnumChildWindows did it.