Quote:
Originally Posted by Anders
You need to specify the parameter types in the call to GetWindowText. First look them up on MSDN and then find the matching type in the System plug-in readme...
|
hi,thanks
i see msdn and see this codes:
HTML Code:
Private Declare Function SetParent Lib "user32.dll" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Private Declare Function GetParent Lib "user32" (ByVal hWnd As Long) As Long
Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hWnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Public Function GetParentFormCaption(ByVal lngHwnd As Long) As String
Dim strBuff As String * 255
Dim lngOldHwnd As Long, lngResult As Long
lngOldHwnd = GetParent(lngHwnd)
lngResult = GetWindowText(lngOldHwnd, strBuff, Len(strBuff))
GetParentFormCaption = Trim(strBuff)
End Function
GetWindowText have 3 parameter and i use 3 parameter for that in convert
HTML Code:
GetWindowText(lngOldHwnd, strBuff, Len(strBuff))
but i don't know whay my code callback to me value 0!
HTML Code:
;------------------
;P3:
System::Call 'user32::GetWindowText($foreground_hwnd, $txt, StrLen $length2 $txt)i .r3'
MessageBox MB_OK|MB_ICONINFORMATION "$3"
;------------------