简单的说就是取鼠标所在位置对应的窗口句柄?

procedure TForm1.Timer1Timer(Sender: TObject);
var
a:TPoint; //用来存放坐标
hw:HWND; //用来存放窗口句柄
begin
GetCursorPos(a); //取得鼠标坐标,并存放进a中
hw := WindowFromPoint(a); //取得变量a 对应的 窗口句柄
Edit1.Text := IntToStr(a.X);
Edit2.Text := IntToStr(a.Y);
Edit3.Text := IntToStr(hw);
end;

相关文章:

  • 2021-06-14
  • 2021-09-28
  • 2021-10-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-11
  • 2021-11-19
猜你喜欢
  • 2022-01-23
  • 2022-03-09
  • 2022-12-23
  • 2021-09-09
  • 2022-03-01
  • 2022-12-23
  • 2022-02-01
相关资源
相似解决方案