|
-
Oct 22nd, 2000, 01:40 PM
#1
Thread Starter
New Member
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)
-
Oct 29th, 2000, 09:43 AM
#2
Member
How many edit controls have you got on your form that you are searching, note that if they are not enabled or invisible you cannot retrieve the handle for the control.
Grant French
-----------------------------------------------
E-Mail: [email protected]
ICQ: 33122184
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|