sendmessage(FindWindow(0,'窗口标题'),wm_close,0,0);

解决方案 »

  1.   

    sendmessage(FindWindow(0,'窗口标题'),wm_close,0,0);
      

  2.   

    sendmessage() or postmessage or F1
      

  3.   

    重载WndProc过程,你就可以截获窗体的所有消息了。 
      procedure WndProc(var Message: TMessage); override;procedure TForm1.WndProc(var Message: TMessage);
    begin
      //你的处理  inherited;
    end;
      

  4.   

    呵呵,同意楼上,不过,setwindowlong()也是可以的,可能是你没用对吧!
      

  5.   

    我不光想截获窗体的消息,我还嫌结果桌面的消息。我要这样
    setwindowlong(getdesktopwindow,GWL_WNDPROC, yourProc);
    不知道这样可不可以。如果不可以怎么截获桌面上的消息阿