Raw Input
原始输入
This section describes how the system provides raw input to your application and how an application receives and processes that input. Raw input is sometimes referred to as generic input.
这一节描述了系统如何为你的应用程序提供原始输入以及应用程序如何接受和处理这些输入,原始输入有时跟常规输入相提并论。
Overviews
预览
About Raw Input
关于
Raw Input(
原始输入
)
This topic discusses user-input from devices such as joysticks, touch screens, and microphones.
该主题讨论了来自设备的用户输入
,
比如游戏杆
,
触摸屏
,
以及麦克风。
Using Raw Input
使用
Raw Input
This section includes sample code for tasks relating to raw input.
这一节包含与原始输入相关的任务示例代码。
Functions
DefRawInputProc
The DefRawInputProc function calls the default raw input procedure to provide default processing for any
DefRawInputProc
函数调用默认的原始输入处理过程为应用程序没有处理的原始输入消息提供默认的处理。
raw input messages that an application does not process. This function ensures that every message is
该函数确保每个消息都是处理过的。
processed. DefRawInputProc is called with the same parameters received by the window procedure.
DefRawInputProc
使用从窗体过程接受来的参数进行调用。
GetRawInputBuffer
The GetRawInputBuffer function does a buffered read of the raw input data.
GetRawInputBuffer
函数对原始输入数据进行带缓冲区的读操作。
GetRawInputData
The GetRawInputData function gets the raw input from the specified device.
GetRawInputData
函数从指定的设备获取原始输入。
GetRawInputDeviceInfo
The GetRawInputDeviceInfo function gets information about the raw input device.
GetRawInputDeviceInfo
函数获取获取原始输入设备的相关信息。
GetRawInputDeviceList
The GetRawInputDeviceList function enumerates the raw input devices attached to the system.
GetRawInputDeviceList
函数列举连接在系统上的原始输入设备。
GetRegisteredRawInputDevices
The GetRegisteredRawInputDevices function gets the information about the raw input devices for the current application.
GetRegisteredRawInputDevices
获取当前应用程序的原始输入设备的相关信息。
RegisterRawInputDevices
The RegisterRawInputDevices function registers the devices that supply the raw input data.
RegisterRawInputDevices
函数对提供原始输入数据的设备进行注册。
Macros
GET_RAWINPUT_CODE_WPARAM
The GET_RAWINPUT_CODE_WPARAM macro gets the input code from wParam in WM_INPUT.
GET_RAWINPUT_CODE_WPARAM
宏从
WM_INPUT
消息的
wParam
参数中获取输入码。
NEXTRAWINPUTBLOCK
The NEXTRAWINPUTBLOCK macro gets the location of the next structure in an array of RAWINPUT structures.
NEXTRAWINPUTBLOCK
宏获取
RAWINPUT
结构体数组中下一个结构体的地址。
Notifications
WM_INPUT
The WM_INPUT message is sent to the window that is getting raw input.
获得原始输入后
WM_INPUT
消息被发送到窗口。
A window receives this message through its WindowProc function.
一个窗口通过他的
WindowProc
函数接收这个消息。
Structures
RAWHID
The RAWHID structure describes the format of the raw input from a Human Interface Device (HID).
RAWHID
结构描述从
HID(Human Interface Device,人机接口设备
)
获取的原始输入的格式。
RAWINPUT
The RAWINPUT structure contains the raw input from a device.
RAWINPUT
结构包含从设备获取的原始输入。
RAWINPUTDEVICE
The RAWINPUTDEVICE structure defines information for the raw input devices.
RAWINPUTDEVICE
结构定义了原始输入设备的信息。
RAWINPUTDEVICELIST
The RAWINPUTDEVICELIST structure contains information about a raw input device.
RAWINPUTDEVICELIST
结构包含原始输入设备的相关信息。
RAWINPUTHEADER
The RAWINPUTHEADER structure contains the header information that is part of the raw input data.
RAWINPUTHEADER
结构包含了原始输入数据的头部信息。
RAWKEYBOARD
The RAWKEYBOARD structure contains information about the state of the keyboard.
RAWKEYBOARD
结构包含了键盘的状态信息。
RAWMOUSE
The RAWMOUSE structure contains information about the state of the mouse.
RAWMOUSE
结构包含了鼠标的状态信息。
RID_DEVICE_INFO
The RID_DEVICE_INFO structure defines the raw input data coming from any device.
RID_DEVICE_INFO
结构定义了来自任意设备的原始输入数据。
RID_DEVICE_INFO_HID
The RID_DEVICE_INFO_HID structure defines the raw input data coming from the specified HID.
RID_DEVICE_INFO_HID
结构定义了来自特定
HID
的原始输入数据。
RID_DEVICE_INFO_KEYBOARD
The RID_DEVICE_INFO_KEYBOARD structure defines the raw input data coming from the specified keyboard.
RID_DEVICE_INFO_KEYBOARD
结构定义了来自特定键盘的原始输入数据。
RID_DEVICE_INFO_MOUSE
The RID_DEVICE_INFO_MOUSE structure defines the raw input data coming from the specified mouse.
RID_DEVICE_INFO_MOUSE
结构定义了来自指定鼠标的原始输入数据。