K
kru
Hi All,
I've been trying to get FindWindowEx to work to locate a button, and
am stumped on the following:
The structure of the external app is as so from Spy++:
- "Main Window" - ThunderRT6FrmDC
- "" - ThunderRT6Frame (outer panel)
- "" - ThunderRT6Frame (inner panel)
- "&Feedback" - ThunderRT6CommandButton (button within
2 panels)
This is my code so far:
Dim parentHnd as New IntPtr = FindWindow("ThunderRT6FormDC", "Main
Window")
Dim bigcontainerHnd As IntPtr = FindWindowEx(parentHnd, IntPtr.Zero,
"ThunderRT6Frame", "")
Dim smlcontainerHnd As IntPtr = FindWindowEx(bigcontainerHnd,
IntPtr.Zero, "ThunderRT6Frame", "")
Dim feedbackBtnHnd = FindWindowEx(smlcontainerHnd, IntPtr.Zero,
"ThunderRT6CommandButton", "&Feedback")
I can get handle results for the parentHnd and also the first panel
bigcontainerHnd however get 0's for the smalcontainerHnd and the
feedbackBtnHnd, can anyone see what I'm doing wrong in the above code?
Many thanks,
Kru
I've been trying to get FindWindowEx to work to locate a button, and
am stumped on the following:
The structure of the external app is as so from Spy++:
- "Main Window" - ThunderRT6FrmDC
- "" - ThunderRT6Frame (outer panel)
- "" - ThunderRT6Frame (inner panel)
- "&Feedback" - ThunderRT6CommandButton (button within
2 panels)
This is my code so far:
Dim parentHnd as New IntPtr = FindWindow("ThunderRT6FormDC", "Main
Window")
Dim bigcontainerHnd As IntPtr = FindWindowEx(parentHnd, IntPtr.Zero,
"ThunderRT6Frame", "")
Dim smlcontainerHnd As IntPtr = FindWindowEx(bigcontainerHnd,
IntPtr.Zero, "ThunderRT6Frame", "")
Dim feedbackBtnHnd = FindWindowEx(smlcontainerHnd, IntPtr.Zero,
"ThunderRT6CommandButton", "&Feedback")
I can get handle results for the parentHnd and also the first panel
bigcontainerHnd however get 0's for the smalcontainerHnd and the
feedbackBtnHnd, can anyone see what I'm doing wrong in the above code?
Many thanks,
Kru