I know that a LPARAM variable has certain bits set(inside it) that identify information such as long key presses & etc. when I receive a WM_KEYDOWN event.
So I a
A much easier way is to declare your own structure.
// information about key
union KeyInfo
{
// LPARAM
LPARAM lParam;
// bit-field
struct Bits {
WORD nRepeatCount: 16;
BYTE nScanCode : 8;
BYTE nExtended : 1;
BYTE nReserved : 4;
BYTE nContext : 1;
BYTE nPrevious : 1;
BYTE nTransition : 1;
};
};
That said, it's still a good idea to learn bit-arithmetic & as someone in the thread said there is a wealth of resources for this on the internet that can be found via Google.
EDIT: See this link which basically shows how to do what I just did.