Original Post
Ok. I got the book Windows Game Programming for dummies and I''m at the direct input part. The current stade of my directx sdks are the one that are included whit Microsoft Visual C++ 6.0. I''m not sure what version they are because there is no version on .h files but I''m assuming thats its the version 6 or 5. Here is the code of direct Input I''m using.
#define INITGUID
#include <windows.h>
#include <dinput.h>
#include <objbase.h>
HINSTANCE hInstance;
HWND hwnd;
LPDIRECTINPUT lpdi;
LPDIRECTINPUTDEVICE lpdikey;
// Here is some codes about creating the window
int Init() // this is where I''m implementing my direct Input code
{
if(DirectInputCreate(hInstance, DIRECTINPUT_VERSION, &lpdi, NULL) != DI_OK)
{
MessageBox(NULL, "Error", "Error", MB_OK | MB_ICONERROR);
}
lpdi->CreateDevice(GUID_SysKeyboard, &lpdikey, NULL);
lpdikey->SetCooperativeLevel(hwnd, DISCL_BACKGROUND | DISCL_NONEXCLUSIVE);
return 0;
}
Kevin