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