enigmaICE
Oct 22nd, 2000, 01:40 PM
I'm having a problem locating a handle of a edit control. I've heard that when locating a handle in VB the API searches from left to right on your form. This is a part of the code i'm using. It seems to be getting the handle correct until it reaches Lchild4 then it goes off in another direction on the form and Lchild5 returns a 0, Is there another way of locating the edit control i want? Sorry, If this post is a little confusing.
Dim lParent As Long
lParent = FindWindow(vbNullString, AppName)
Dim lChild1 As Long
lChild1 = FindWindowEx(lParent, 0, "AfxFrameOrView42s", vbNullString)
Dim lChild2 As Long
lChild2 = FindWindowEx(lChild1, 0, "AfxFrameOrView42s", vbNullString)
Dim lChild3 As Long
lChild3 = FindWindowEx(lChild2, 0, "AfxFrameOrView42s", vbNullString)
Dim lChild4 As Long
lChild4 = FindWindowEx(lChild3, 0, "AfxFrameOrView42s", vbNullString)
Dim lChild5 As Long
lChild5 = FindWindowEx(lParent, 0, "Edit", vbNullString)
Dim lParent As Long
lParent = FindWindow(vbNullString, AppName)
Dim lChild1 As Long
lChild1 = FindWindowEx(lParent, 0, "AfxFrameOrView42s", vbNullString)
Dim lChild2 As Long
lChild2 = FindWindowEx(lChild1, 0, "AfxFrameOrView42s", vbNullString)
Dim lChild3 As Long
lChild3 = FindWindowEx(lChild2, 0, "AfxFrameOrView42s", vbNullString)
Dim lChild4 As Long
lChild4 = FindWindowEx(lChild3, 0, "AfxFrameOrView42s", vbNullString)
Dim lChild5 As Long
lChild5 = FindWindowEx(lParent, 0, "Edit", vbNullString)