hi, im trying to learn how to make a keyboard hook for C++ to improve my cheat/macro app for a game; use keyboard hook instead of GetAsyncKeyState().

where can i find the codes for this and a line by line explanation about the use of the API? many of the examples i found include StdAfx.h... which includes a whole bunch of libraries my compiler says are not there. in addition to the usage of data type "BOOL".. which isnt recognised by the compiler.

please help.

The functions you are seeking is Windows Hooks. Just include <windows.h> and you will get their prototypes, as well as declaration of BOOL and other win32 macros/defines.

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.