Results 1 to 2 of 2

Thread: How to obtain handle to a character based field thru API

  1. #1
    Megatron
    Guest
    You need to use the FindWindowEx API to get the handle of the Edit control.
    VB Code:
    1. hParent = FindWindowEx(0, 0, "ParentWindowClass","ParentWindowName")
    2. If hParent <> 0 Then
    3.     hChlid = FindWindowEx(hParent,0,"Edit",vbNullString)
    4.     If hChild <> 0 Then
    5.         SendMessage hChild, WM_SETTEXT, 0, ByVal "MyText"
    6.     End If
    7. End If

  2. #2
    New Member
    Join Date
    Jul 2001
    Location
    USA
    Posts
    1
    hchild is returning zero. What should the "Edit" be replaced with? Shoul it be the actual field name ? I tried GETNEXTWINDOW(hparent, GW_CHILD) and I got the handle for the window status bar. What am i doing wrong?????

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width