Results 1 to 2 of 2

Thread: Mouse position relative to window.

  1. #1
    Join Date
    Aug 2016
    Location
    Kentucky
    Posts
    254
    Mentioned
    3 Post(s)
    Quoted
    96 Post(s)

    Default Mouse position relative to window.

    So I'm working on a memory based c++ bot. I've looked around and I'm having trouble binding a solid way to detect mouse position specific to a window in c++ as well as move the mouse there. Any help would be appreciated.

  2. #2
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    GetCursorPos(P);
    GetWindowRect(Window);

    P.X := P.X - Window.Left;
    P.Y := P.Y - Window.Top;

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •