BOOL WINAPI ImmSetHotKey( //设置输入法的热键
DWORD dwHotKeyID,
UINT uModifiers,
UINT uVKey,
hKL hKL
)
请问输入法 API 函数 immsethotkey 到底该怎样使用呢?我试用 immgethotkey 函数取得了 uModifiers、uVKey、hKL 等数据后直接再写回去,函数虽能正常执行,结果却是错的,在注册表中生成的值完全不对。unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}
function ImmGetHotKey(dwHotKeyID: DWord; var uModifiers: UINT; var uVKey: UINT; var hKL: HKL): Boolean; stdcall; external 'Imm32.dll' Name 'ImmGetHotKey';
function ImmSetHotKey(dwHotKeyID: DWord; var uModifiers: UINT; var uVKey: UINT; var hKL: HKL): Boolean; stdcall; external 'Imm32.dll' Name 'ImmSetHotKey';
procedure TForm1.FormCreate(Sender: TObject);
var
uModifiers,uVKey: UINT;
ime: HKL;
begin
immgethotkey($100,uModifiers,uVKey,ime);
immsethotkey($100,uModifiers,uVKey,ime);
end;
end.此段程序取注册表的热键数据,例如:
[HKEY_CURRENT_USER\Control Panel\Input Method\Hot Keys\00000100]
"Virtual Key"=hex:31,00,00,00
"Key Modifiers"=hex:06,c0,00,00
"Target IME"=hex:04,08,0e,e0
然后再直接写回去,然而结果却变成了:
[HKEY_CURRENT_USER\Control Panel\Input Method\Hot Keys\00000100]
"Virtual Key"=hex:18,fe,12,00
"Key Modifiers"=hex:14,fe,12,00
"Target IME"=hex:1c,fe,12,00请问错在哪里,应该如何做呢?
DWORD dwHotKeyID,
UINT uModifiers,
UINT uVKey,
hKL hKL
)
请问输入法 API 函数 immsethotkey 到底该怎样使用呢?我试用 immgethotkey 函数取得了 uModifiers、uVKey、hKL 等数据后直接再写回去,函数虽能正常执行,结果却是错的,在注册表中生成的值完全不对。unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}
function ImmGetHotKey(dwHotKeyID: DWord; var uModifiers: UINT; var uVKey: UINT; var hKL: HKL): Boolean; stdcall; external 'Imm32.dll' Name 'ImmGetHotKey';
function ImmSetHotKey(dwHotKeyID: DWord; var uModifiers: UINT; var uVKey: UINT; var hKL: HKL): Boolean; stdcall; external 'Imm32.dll' Name 'ImmSetHotKey';
procedure TForm1.FormCreate(Sender: TObject);
var
uModifiers,uVKey: UINT;
ime: HKL;
begin
immgethotkey($100,uModifiers,uVKey,ime);
immsethotkey($100,uModifiers,uVKey,ime);
end;
end.此段程序取注册表的热键数据,例如:
[HKEY_CURRENT_USER\Control Panel\Input Method\Hot Keys\00000100]
"Virtual Key"=hex:31,00,00,00
"Key Modifiers"=hex:06,c0,00,00
"Target IME"=hex:04,08,0e,e0
然后再直接写回去,然而结果却变成了:
[HKEY_CURRENT_USER\Control Panel\Input Method\Hot Keys\00000100]
"Virtual Key"=hex:18,fe,12,00
"Key Modifiers"=hex:14,fe,12,00
"Target IME"=hex:1c,fe,12,00请问错在哪里,应该如何做呢?
解决方案 »
- ADOStoredProc1控件调用储存过程出错??
- 关于调用ftp问题?
- a>>>>>>>>>>>>>>>>>>>反对日本为常任理事国签名<<<<<<<<<<<<<<<<<<[请求固顶]
- 如何用最简短的程序让Panel上所有具有ReadOnly属性的控件的该属性值为True
- 怎样制作一个可以通过网络升级的程序?
- rave报表怎么传参数
- 图形按扭
- 请问我要用进度条显示这个PcmtoWave(Pchar(FileName.Text),Pchar(FileName.text+'.wav'))函数执行的进度,应该怎样编程?
- 有关一个RXDBCtrl.dcu的问题
- 我的CGI不能用ADO,为什么?
- 求判断输入的身份证号码是否合法的算法
- 有关控件全部修改的问题!急啊!!!
这个函数 没用过哦 再MSDN怎么查不到??
DWORD dwHotKeyID
);
ParametershWndHandle to the window.dwHotKeyIDIdentifier of the IME hot key. Can be one of the values specified in the "IME Hot Key Identifiers" table in Input Method Editor Constants. Return ValuesIf the function succeeds, the return value is a nonzero value.
If the function fails, the return value is zero.
OS Versions: Windows CE .NET 4.0 and later.
Header: Imm.h.
Link Library: Coreimm.lib.
此函数在 MSDN 上说明是支持 windows CE 的,但在一些介绍输入法的网站上介绍说普通 windows 也可用。
那么 windows 本身设置输入法时到底是用了什么函数呢?