- 注册时间
- 2011-3-6
- 最后登录
- 1970-1-1
该用户从未签到
|
发表于 2011-4-3 14:39:53
|
显示全部楼层
function EnumWindowProc(AWnd: HWND; AlParam: LPARAM):Boolean;stdcall;//遍历
var
strCaption,strClassName: pChar;
p:Dword;
begin
GetMem(strCaption, 255);
GetMem(strClassName, 255);
GetWindowText(AWnd, strCaption,255);//窗口
GetClassName(AWnd, strClassName, 255);//类
GetWindowThreadProcessId(awnd,@P);//PID
if (StrPas(strClassname)='UniqueGameUniqueWWindowsViewportWindow') then
begin
if p=GetCurrentProcessId then
begin
//form1.mmo1.Lines.Add(IntToHex(AWnd,8)+'|'+inttostr(p)+'|'+inttostr(GetCurrentProcessId));
msws:=awnd;
end;
end;
Result := True;
end; |
|