Microsoft DirectX 8.1 (C++) |
Sets the data format for a device and maps application-defined actions to device objects. It also sets the buffer size for buffered data.
Note The device must be unacquired prior to calling this method.
HRESULT SetActionMap( LPCDIACTIONFORMAT lpdiActionFormat, LPCTSTR lptszUserName, DWORD dwFlags );
If the method succeeds, the return value can be one of the following error values:
DI_OK |
DI_SETTINGSNOTSAVED |
DI_WRITEPROTECT |
If the method fails, the return value can be one of the following error values.
DIERR_ACQUIRED |
DIERR_INVALIDPARAM |
This method provides the mechanism to change action-to-control mapping from the device defaults. An application must use this method to map its in-game actions to virtual controls.
The user name passed to this method binds a set of action mappings for a device to a specific user. Settings are automatically saved to disk when they differ from the currently applied map. Applications that accept input from multiple users should be very careful when applying action maps to the system mouse or keyboard, as the action maps for each user may conflict.
The method can be called only when the device is not acquired.
Windows NT/2000/XP: Requires Windows® 2000.
Windows 98/Me: Requires Windows 98 or later. Available as a redistributable for Windows 98.
Header: Declared in Dinput.h.