gpt4 book ai didi

c++ - `RAWINPUT::header::wParam`包含什么用于键盘输入

转载 作者:行者123 更新时间:2023-11-28 02:20:40 26 4
gpt4 key购买 nike

在查看 RAWINPUT 结构的 MSDN 文档时,它有以下声明:

typedef struct tagRAWINPUT {
RAWINPUTHEADER header;
union {
RAWMOUSE mouse;
RAWKEYBOARD keyboard;
RAWHID hid;
} data;
} RAWINPUT, *PRAWINPUT, *LPRAWINPUT;

此外,RAWINPUTHEADER 结构包含这些:

typedef struct tagRAWINPUTHEADER {
DWORD dwType;
DWORD dwSize;
HANDLE hDevice;
WPARAM wParam;
} RAWINPUTHEADER, *PRAWINPUTHEADER;

其中感兴趣的是成员wParam:

wParam

Type: WPARAM

The value passed in the wParam parameter of the WM_INPUT message.

那么,这个 wParam 到底包含什么? (专门针对键盘KEYDOWN输入?)

最佳答案

WM_INPUT 的文档告诉你这个信息:

wParam
The input code. This parameter can be one of the following values.

RIM_INPUT
0
Input occurred while the application was in the foreground. The application must call DefWindowProc so the system can perform cleanup.

RIM_INPUTSINK
1
Input occurred while the application was not in the foreground. The application must call DefWindowProc so the system can perform the cleanup.

关于c++ - `RAWINPUT::header::wParam`包含什么用于键盘输入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32664747/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com