为什么我用钩子钩住之后,一次窗口创建过程回调用很多次回掉函数中过滤后的语句?<br>而且这个语句好象不起作用:sendMessage(temp,WM_SHOWWINDOW,1,0);<br><br>我的回调程序如下:<br> function CallBackHook(nCode: Integer; wp: wParam; lp: lParam): LResult; stdcall;<br>var<br> temp:HWnd;<br>begin<br> if (( PCWPStruct(lp)^.Message = WM_CREATE) and<br> ( PCWPStruct(lP)^.hwnd<>0)) then<br> begin<br> //messagebox(PCWPStruct(lP)^.hwnd,pchar('Test'),pchar('Test'),MB_OKCANCEL) ;<br> temp:=findWindow('#32770','发送消息');<br> if temp<>0 then<br> begin<br> sendMessage(temp,WM_SHOWWINDOW,1,0);<br> MessageDlg('出来了!',mtConfirmation, [mbYes, mbNo], 0);<br> end;<br> Exit;<br> end;<br>Result := CallNextHookEx( HookKeyBoard, nCode, wP, lP);<br>end;<br>