System-wide cross hair cursor (cross is size of screen)

Windows specific forum
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

System-wide cross hair cursor (cross is size of screen)

Post by IdeasVacuum »

There is a way to have such a cursor run natively, such that it behaves just like the regular cursor. Try this one for example, it's very nice:
Cross Hair Cursor

HyperSnap has a nice version too - it is more client specific but does it's task perfectly:
HyperSnap

For my own app, I have defined a transparent window with the cursors drawn on it. The window adapts to the screen size and is hidden when over the toolbar of my app. It works OK on XP but is completely rubbish on Win7.

So, what is the 'proper' way to code a solution for this? Toggle between the standard cursor and a full cross hair cursor? The exe for the above cross hair is only 100KB so it would seem that not a lot of code is needed to get there.

Edit: It seems that the HyperSnap method is to draw a fixed transparent window over the (entire) desktop, then draw the cross hair lines at the cursor position (in the main loop). This might be a better method for Win7, but strangely I can't get it to work on XP at the moment.......

Edit Edit: OK, got it basically right on XP but still requires some changes elsewhere in the code - such a shame that XP and Win7 are so different in this area.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.