网站首页  词典首页

请输入您要查询的函数:

 

术语 getkeynametext
释义 GetKeyNameText
语法:
int GetKeyNameText( LONG lParam,
LPTSTR lpString,
int nSize
);
GetKeyNameText功能
该GetKeyNameText函数检索一个字符串,它代表着一个重要的名字。
参数
lparam的
[in]指定(如WM_KEYDOWN)键盘消息的第二个参数进行处理。该函数在解释中的lparam以下位的位置。
16-23
扫描代码。
24
扩展键标志。区分增强型键盘上的某些键。
25
“不关心”位。应用程序调用该函数设置此位,表明该函数不应该左派和右派之间Ctrl和Shift键,例如区别。
lpString
[out]指向的缓冲区将获得关键的名称。
nSize
[in]指定的最大长度,在TCHAR,关键的名称,包括终止空字符。 (此参数应等于缓冲区的大小指出的lpString参数。)
返回值
如果函数成功,一个空结束的字符串是到指定的缓冲区复制,并返回值是字符串的长度,TCHAR,不计终止空字符。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
键的名称字符串的格式取决于当前的键盘布局。键盘驱动程序的名称保持在键与名称字符串的形式不是单一的字符更长的名单。关键的名字被翻译根据当前安装的键盘布局,因此该函数可能会给出不同的输入区域设置不同的结果。一个字符键的名称是字符本身。死键的名称充分阐明了。
在Windows 95/98/Me:GetKeyNameTextW是支持微软层对于Unicode。要使用此,您必须将某些文件到您的应用,概述了对Unicode的Microsoft层在Windows 95/98/Me系统。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 3.1
UnicodeImplemented为ANSI和Unicode版本。
参见
键盘输入
==英文原文==GetKeyNameText Function
The GetKeyNameText function retrieves a string that represents the name of a key.
Syntax
int GetKeyNameText( LONG lParam,
LPTSTR lpString,
int nSize
);
Parameters
lParam
[in] Specifies the second parameter of the keyboard message (such as WM_KEYDOWN ) to be processed. The function interprets the following bit positions in the lParam.
16—23
Scan code.
24
Extended-key flag. Distinguishes some keys on an enhanced keyboard.
25
"Don't care" bit. The application calling this function sets this bit to indicate that the function should not distinguish between left and right CTRL and SHIFT keys, for example.
lpString
[out] Pointer to a buffer that will receive the key name.
nSize
[in] Specifies the maximum length, in TCHAR, of the key name, including the terminating null character. (This parameter should be equal to the size of the buffer pointed to by the lpString parameter.)
Return Value
If the function succeeds, a null-terminated string is copied into the specified buffer, and the return value is the length of the string, in TCHAR, not counting the terminating null character.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
Remarks
The format of the key-name string depends on the current keyboard layout. The keyboard driver maintains a list of names in the form of character strings for keys with names longer than a single character. The key name is translated according to the layout of the currently installed keyboard, thus the function may give different results for different input locales. The name of a character key is the character itself. The names of dead keys are spelled out in full.
Windows 95/98/Me: GetKeyNameTextW is supported by the Microsoft Layer for Unicode. To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems .
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows 95, Windows NT 3.1
UnicodeImplemented as ANSI and Unicode versions.
See Also
Keyboard Input
==原始网址==http://msdn.microsoft.com/en-us/library/ms646300(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:26:38