DirectX:DirectInput:Tutorials:Keyboard

From GDWiki

Jump to: navigation, search

[edit] What is DirectX?

If you are unfamiliar with DirectX or DirectInput, please consult the preceding links.

[edit] What do I need

To make a program with DirectX you need the following things:

If you have difficulty setting up your compiler with DirectX, consult the SDK, or search the web for help.

[edit] Making a simple DirectInput application

Before we make our class, I will show you how DirectInput works. I will do this by showing you a sample application which uses DirectInput to handle keypresses.

First, make a normal windows application with your IDE. Add the following code to the project:

#define INITGUID
 
#include <dinput.h>

... to be continued ...

Personal tools
Categories