-
cursor question
hmmm
when i have a cursor
i use the mouse with the left top corner of the cursor
when i click with the left top corner it will work
and the position of the cursor is by the left top corner
so
the question:
How can i make a cursor that will work with the middle point of
the cursor
??
-
If you're talking about a regular cursor and not your own GUI (ie: DirectX) then you could do some tricky stuff when you get a WM_LBUTTONDOWN, WM_RBUTTONDOWN message, etc.
Offset the x and y values and load them into a POINT. If that POINT lies within your predefined RECT then execute your code.
-
Your cursor may be out by one or 2 pixcels because if you use GetWindowRect() or GetClientRect() as these functions do not include the last row in the RECT (reducing the area by one each) Try adding one or two to your offset.
-
OR you could make a *.cur file and set the hotpoint :D