0

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

3
Contributors
6
Replies
8
Views
6 Years
Discussion Span
Last Post by Ancient Dragon
0

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

0

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

0

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

0

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

Edited by Ancient Dragon: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.