-
DirectInput
I'm trying to use DirectInput in my program and was basically wondering where/how do I start? I've found some tutorials but at this point all I really want to do is play with one input device at a time. Most tutorials start with a minimum of mouse/keyboard.
Also, I'm using the DirectX 9 SDK and was wondering if there would be any kind of conflicts if I mixed different versions of DirectX in my program (ie: DirectInput 9, DirectDraw 7, etc)?
mw
-
why would you have different versions of the SDK on your computer? I hope you installed them in different directories so that only one version can be used for any given program.
-
Never mind. I found my answer about version compatibility.
Anyway, what about the DirectInput tutorials? There is not a single tutorial I've found that starts at the beginning of the program and illustrates how to setup a single input device (everything shows you how to setup multiple devices and doesn't show you includes, etc).
mw
-
Ok, I think this is starting to sink in a little.
I'm using the DirectInput8Create function:
Code:
int My_Direct_Input (void)
{
FILE *fp = fopen ("initialize_report.txt", "a");
if (!(DirectInput8Create (hInstance, DIRECTINPUT_VERSION, IID_IDirectInput8, (void **) &m_pDirectInput, NULL)))
{
fprintf (fp, "\n\nDirectInput initialization: FAILED");
Direct_flag = 0;
}
else
{
(insert initialization code here)
}
}
The error I'm getting is:
'DirectInput8Create' undefined; assuming extern returning int
I have dinput.h in my includes and dinput.lib in my library modules, so I'm really not sure why this is undefined.
Does anyone know why I'm getting this error?
mw
-
Ok, I've found out why I couldn't get it to compile:
MSVC++ ver 6.0 isn't supported by any SDKs effective 12/04.
In order to use DirectX ver 9 with it, you have to use the 10/04 release of DirectX:
http://www.microsoft.com/downloads/d...DisplayLang=en
mw