我做了一个shellhook,但奇怪的是他只能得到本进程的窗口创建等一系列消息,对于其他进程创建的窗口就不会引发这个hook,真得很奇怪。我现在想hook其他窗口创建和destroy怎么办?下面是我的代码。function shellHookProc(iCode:Integer;wParam1:wParam;lParam1:lParam):LRESULT;stdcall;
begin
  Result:=0;
  DebugOutput(inttostr(iCode));
  if iCode<0 then Result := CallNextHookEx(hHook1,iCode,wParam1,lParam1);
end;procedure SetshellHook(hnd:HWND);
begin
  hHook1:=SetwindowsHookEx(WH_SHELL,TaskHookProc,hInstance,0);
  if hHook1 <=0 then messagebox(0,'hookError','task',16);
end;procedure RemoveshellHook;
begin
   UnhookWindowsHookEx(hhook1);
end;