June 25th, 2003, 10:28 AM
How to know which direction the mouse cursor(pointer) is going??
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.
June 25th, 2003, 01:15 PM
I think you would have to compare the current position to the position when they began the drag (mousedown)
June 26th, 2003, 01:23 PM
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.