泥
泥头车
Unregistered / Unconfirmed
GUEST, unregistred user!
原来我有个程序用的如下代码找RICHEDIT的句柄,在QQ2006贺岁版中工作良好,可最近升级到QQ2003Beta3后,却找不到RICHEDIT的句柄了,在执行了<br> hLastWin := FindWindowEx(hLastWin, THandle(nil), 'RICHEDIT', nil);<br> if hLastWin = 0 then Exit;<br>后,hLastWin现在等于0,直接退出了.程序的代码如下,看谁能帮我调一下,我对SPY++的用法不是很了解:<br><br>var<br> hLastWin, hButton: THandle;<br> szWindowText: array[0..MAX_PATH] of Char;<br> szTextLength: Integer;<br> sTailer, sQQName: string;<br>begin<br> hLastWin := GetForegroundWindow;<br> GetClassName(hLastWin, szWindowText, SizeOf(szWindowText));<br> if szWindowText <> '#32770' then Exit;<br> szTextLength := SendMessage(hLastWin, WM_GETTEXT, MAX_PATH, Integer(@szWindowText[0]));<br> szWindowText[szTextLength] := #0;<br> if (Pos('ÁÄÌìÖÐ', szWindowText) > 0) or (Pos('Ⱥ', szWindowText) > 0) then<br> begin<br> sQQName := Copy(szWindowText, Pos(' ', szWindowText) + 1, Pos('ÁÄÌìÖÐ', szWindowText) - Pos(' ', szWindowText) - 2);<br> hLastWin := FindWindowEx(hLastWin, THandle(nil), '#32770', nil);<br> if hLastWin = 0 then Exit;<br> hButton := FindWindowEx(hLastWin, THandle(nil), nil, '·¢ËÍ(&S)');<br> if hButton = 0 then Exit;<br> hLastWin := FindWindowEx(hLastWin, THandle(nil), 'AfxWnd42', nil);<br> if hLastWin = 0 then Exit;<br> hLastWin := FindWindowEx(hLastWin, THandle(nil), 'RICHEDIT', nil);<br> if hLastWin = 0 then Exit;<br> ShowMessage(IntToStr(hLastWin));<br> end;<br>end;