Click to See Complete Forum and Search --> : INPUT class?


SnapCrakllPop
September 26th, 2009, 07:47 PM
I just downloaded someone's source for an old project that he discontinued and has abandoned and made open source. I looked over the code and saw (in multiple spots) what needs to be done to update and continue it. It's a simple matter of changing some memory addresses and also fixing some boolean variables. Anyway, here's the question:

I tried compiling what he posted. I got the error
'INPUT' undeclared

It was used in this situation:
INPUT *key;

So it's either a class declared in a not-included header or the version of windows.h (which is where I'd assume it would be) is missing something. I'm using the one that came with Dev-C++.

Anyone have any information on the INPUT class? I've searched google but I gotta say, "list of classes in windows.h" and "c++ input class" turn up a head-turning amount of unrelated results.

Thanks,
Richard

hoxsiew
September 26th, 2009, 08:44 PM
In WinUser.h it's declared:


typedef struct tagINPUT {
DWORD type;

union
{
MOUSEINPUT mi;
KEYBDINPUT ki;
HARDWAREINPUT hi;
};
} INPUT, *PINPUT, FAR* LPINPUT;