N
nwskyblue
Unregistered / Unconfirmed
GUEST, unregistred user!
//只检索第一个top_level窗口的句柄,测试EnumWindows的用法<br>procedure TForm1.Button1Click(Sender: TObject);<br>var<br> xx : Integer;<br>begin<br> xx :=0;<br> if enumwindows(@EnumWindowsProc,xx) then<br> showmessage('success');<br>end;<br><br>//EnumWindowProc已经声明为stdcall<br>function TForm1.EnumWindowsProc(hwnd: cardinal; lParam: integer): Boolean;<br>begin<br> showmessage(inttostr(hwnd));<br> result := false;<br>end;<br><br>居然提示"Variable required",我对照函数类型,没错啊,郁闷.........