I'd like to know what the ASCII codes for the toggle keys of the keyboard. I want to make the mouse clicks do different thing when the Caps Lock, or Scroll Lock is pressed.

Walt

Thanks Ancient Dragon for the lead.
I studied it and found it needed both
#include "windows.h" and
#include "winuser.h" in the .cpp file that has the call.
But I get the dreaded linker error LNK2001; unresolved external symbol.
Do you have experience with that error?

Thanks

Look at that link I gave you, scroll down the page and it will tell you what libraries you need.

You don't have to include winuser.h when you include windows.h

Wow, THAT DID IT.
THANK YOU SO MUCH Ancient Dragon.

For anyone as beginner as I am, the .lib is loaded in Visual Studio by way of the Project tab. In there choose the last option xxx Properties Alt+F7.
Then click on the + of Configuration Properties, then the + of Linker and then Command Line. And at the bottom is Additional options: In huge space type User32.lib

you can also just use the pragma, located near the beginning of the *.cpp file, after the includes #pragma comment(lib,"user32.lib")

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.