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
);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.
|
|
---|
}
else
{
MessageBox(g_hWnd,"Direct Device Failed","",MB_OK); PostQuitMessage(0);
}
}
else
{
MessageBox(g_hWnd,"DirectInput Failed","",MB_OK); PostQuitMessage(0);
}
return S_OK;
}