GetCursorPos(pt);
  hWindow := WindowFromPoint(pt);
  dwThreadID := GetWindowThreadProcessId(hWindow, nil);
  dwCurrentThreadID := GetCurrentThreadId;
  if (dwCurrentThreadID <> dwThreadID) then
  begin
    if AttachThreadInput(dwCurrentThreadID, dwThreadID, True) then
    begin
      Result := GetCursor;
      AttachThreadInput(dwCurrentThreadID, dwThreadID, False);
    end;
  end
  else
  begin
    Result := GetCursor;
  end;
我用以上函数取得了鼠标,但是不知道怎么对该鼠标进行超作。
  CurPosX, CurPoxY  : Integer;
  MyCursor          : TIcon;
  pIconInfo         : TIconInfo;
begin
  MyCursor := TIcon.Create;
  try
    MyCursor.Handle := GetCursorHandle;
    GetIconInfo(MyCursor.Handle, pIconInfo);
    MyCursor.SaveToFile('C:\1.cur')
  finally
    MyCursor.ReleaseHandle;
    MyCursor.Free;
直接保存系统会出错,而且我希望能够把存入的.cur函数能够调出,判断是否于当前鼠标状态相同。
求代码