Pages: 2
Rating : ⭐⭐⭐⭐⭐
Price: $10.99
Page 1 Preview
these can coded after devices creation inside init

These can coded after devices creation inside initinput

88 Part I
Chapter 4: Introducing DirectInput

DISCL_EXCLUSIVE: No other application can obtain exclusive access to a device while another holds it. When mice and keyboards are used in this mode, a programmer must be certain to unacquire the device when the Windows messages WM_ENTERSIZEMOVE or WM_ENTERMENULOOP are received; otherwise, the devices will not operate properly. (See the DirectX SDK for more information.)

HRESULT SetDataFormat

LPCDIDATAFORMAT lpdf: The address of a DIDATAFORMAT structure. An application can define its own or use one of a predefined set for the most common types. These include: c_dfDIKeyboard, c_dfDIMouse,
c_dfDIMouse2, c_dfDIJoystick, and c_dfDIJoystick2. For the purposes of this book, we will use the first two.

//Create DirectInput object
HRESULT Result = DirectInput8Create(g_hInst, DIRECTINPUT_VERSION,
IID_IDirectInput8, (void**)&g_lpDI, NULL);

The Foundations

MessageBox(g_hWnd,"Direct Device Failed","",MB_OK); PostQuitMessage(0);
MessageBox(g_hWnd,"DirectInput Failed","",MB_OK); PostQuitMessage(0);
return S_OK;

You are viewing 1/3rd of the document.Purchase the document to get full access instantly

Immediately available after payment
Both online and downloadable
No strings attached
How It Works
Login account
Login Your Account
Place in cart
Add to Cart
send in the money
Make payment
Document download
Download File

Uploaded by : Clive Parker

PageId: ELIC806E88