Click here to Skip to main content
15,903,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I want to change the pen/stylus cursor/icon (I want to toggle between a pencil point and an eraser image) for my application, which is on a Microsoft Surface 3, with Windows 10. I'm using Visual Studio 2015, C++, unmanaged to write the application. I have not been able to find how to do this. It seems it should be simple thing.

Does anyone know how this is done?

Thanks for any feedback!
Regards, John

What I have tried:

GetPointerPenInfo() does not provide the means. I'm using this function to access pen info generally, but it doesn't help me change the pen's icon. I've done an extensive web search, but I strangely can not find this information.
Posted
Updated 16-May-17 13:28pm

Have you tried LoadCursor() and SetCursor() ?
 
Share this answer
 
Sorry for the late response. That did work. Thanks! The WM_SETCURSOR message is where I trigger SetCursor(LoadCursor()).
 
Share this answer
 
Comments
Richard Deeming 17-May-17 14:35pm    
If you want to reply to a solution, use the "Have a Question or Comment?" button under that solution.

DO NOT post your reply as a new "solution".

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900