对E语言的语法和函数不太了解
给你一段VB的代码 你参考下吧
Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private Sub Form_Load()
Dim str As String
str = String(20, 0)
GetWindowText Me.hwnd, str, 20
MsgBox str
End Sub