#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    49
    Rep Power
    12

    Unhappy How to know which direction the mouse cursor(pointer) is going??


    Hello guys,
    i have a simple problem which i'm sure most of u may b able to help me. Actually i am using the GetCursorPos API to find the mouse coordinates and trying to resize a borderless form. Now my problem is, i want to know in which direction the pointer is going. I mean, i have clicked the left border of the form and now the program must know if i'm dragging the pointer towards left or right. Please help.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Apr 2002
    Posts
    693
    Rep Power
    26
    I think you would have to compare the current position to the position when they began the drag (mousedown)
  4. #3
  5. No Profile Picture
    Overly white
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Location
    Fresno, CA
    Posts
    83
    Rep Power
    12
    One direction should make x/y become smaller while the other should make the pos be larger. It's been awhile but I think it is laid out just like a graph, where right is larger and left is smaller on the x axis and up is larger on the y axis.

IMN logo majestic logo threadwatch logo seochat tools logo