WM_GETTEXT

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Eddy Scheire

    WM_GETTEXT

    Hi all,

    I'm trying to capture the text from a popup window (i.e. a MsgBox). The code
    :

    Const WM_GETTEXT = &HD
    Const WM_GETTEXTLENGT H = &HE

    Dim lHandle As Long
    Dim length As Long
    Dim result As Long
    Dim strtmp As String

    lHandle = FindWindow(vbNu llString, "Some Popup")

    If lHandle <> 0 Then

    length = SendMessage(lHa ndle, WM_GETTEXTLENGT H, ByVal 0, ByVal 0) + 1

    strtmp = Space(length - 1)
    result = SendMessage(lHa ndle, WM_GETTEXT, ByVal length, ByVal strtmp)

    End If

    gives me the title of the popup window ('Some Popup') but not the msg on the
    popup. How kan I get the message?


Working...