How to make a custom mouse cursor in batch?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
aGerman
Expert
Posts: 4245
Joined: 22 Jan 2010 18:01
Location: Germany

Re: How to make a custom mouse cursor in batch?

#16 Post by aGerman » 30 Aug 2021 13:34

Thanks Antonio!
Accuracy is actually tricky here. We can determine the size of the client rectangle of the window. We can also determine its width and hight in character cells. Those are the information that I use to calculate the size of a character cell in pixels. There's no API function to get this size directly (the character size of the font is much less than the size of the cell). So, I guess we are facing some minor rounding errors here. I could try to use floating point arithmetic.
I updated the ZIP archive to address this. Not sure if it's going to get better now. #14 viewtopic.php?p=64989#p64989

Steffen

// EDIT: I observed that the v2 console doesn't snap in at full character cells. That seems to be the main reason for being some pixels off. Using factors and rounding I've been able to mitigate the error a bit. However, if the window is downsized too much, the percentage of the incompletely visible cells will increase and eventually impact the accuracy.

back_slash
Posts: 12
Joined: 20 Aug 2021 08:07

Re: How to make a custom mouse cursor in batch?

#17 Post by back_slash » 04 Sep 2021 17:49

@aGerman

Wow!! Thank you so much, you saved me alot of time!

Post Reply