FUNCTION ulong GetWindowText(ulong hwnd,ref string lpString,ulong cch) LIBRARY "user32.dll" ALIAS FOR "GetWindowTextA"
FUNCTION ulong FindWindowEx(ulong hWnd1,ulong hWnd2,ref string lpsz1,ref string lpsz2) LIBRARY "user32.dll" ALIAS FOR "FindWindowExA"
测试代码
string lpsz1,lpsz2,ls_title
long ul_handle
setnull(lpsz1)
setnull(lpsz2)
ls_title=space(50)
ul_handle=FindWindowEx(0,0,lpsz1,lpsz2)
do while ul_handle<>0
GetWindowText(ul_handle,ls_title,49)
mle_1.text = mle_1.text + "~r~n" +ls_title
ul_handle=FindWindowEx(0,ul_handle,lpsz1,lpsz2)
loop