I am using winapi to handle web page dialog, and I don't have access to visual studio or other tools except excel vba editor. Also, I am not well experienced with winapi.
I want to click on some button of this web page dialog and enter some text.
Using winapi I could find it's handle and tried enumerating child windows, but info received is not proper.
' search for child window accept button
hWndAccept = FindWindowEx(hWndColo, 0, vbNullString, vbNullString)
Debug.Print hWndAccept
and
Public Function EnumChildProc(ByVal hWnd As Long, ByVal lParam As Long) As Long
Dim slength As Long
Dim wintext As String ' window title text length and buffer
Dim retval As Long ' return value
Dim textlen As Long
Static winnum As Integer ' counter keeps track of how many windows have been enumerated
winnum = winnum + 1
textlen = GetWindowTextLength(hWnd) + 1
' Make sufficient room in the buffer.
wintext = Space(textlen)
' Retrieve the text of window Form1.
slength = GetWindowText(hWnd, wintext, textlen)
' Remove the empty space from the string, if any.
wintext = Left(wintext, slength)
' Display the result.
Debug.Print winnum & wintext
EnumChildProc = 1 ' nonzero return value means continue enumeration
End Function
The first function doesn't returns button child windows even if I use "button" type (html button type is may be little bit differnt), so I thought enumerating child window. Doing this I get count of 9 child windows, of which I get title's of two only. getwindows text is not displaying anything.
How could I get properties and other related info about these child windows? I tried finding in winapi documenation but no luck.