中国开发网: 论坛: 程序员情感CBD: 贴子 565823
龙之吻
问题已经解决
IInputObject的TranslateAcceleratorIO方法,原先我是这样实现的:

function TBandUnit.TranslateAcceleratorIO(var lpMsg: TMsg): HResult;
begin
if (lpMsg.WParam <> VK_TAB) then begin
TranslateMessage(lpMSg);
DispatchMessage(lpMsg);
Result := S_OK;
end
else Result := S_FALSE;}
end;
后来改成这样就好了,
function TBandUnit.TranslateAcceleratorIO(var lpMsg: TMsg): HResult;
var
nVirtKey: integer;
begin
nVirtKey := integer(lpMsg.WParam);
if (lpMsg.message = WM_KEYUP) and (nVirtKey = VK_RETURN) then
begin
///.......
Result := S_OK;
end
else
if ((lpMsg.message = WM_KEYUP) or (lpMsg.message = WM_KEYDOWN))
and ((nVirtKey = VK_BACK) or ((VK_END <= nVirtKey) and (VK_DOWN >= nVirtKey))
or (nVirtKey = VK_DELETE)) then
begin
TranslateMessage(lpMSg);
DispatchMessage(lpMsg);
Result := S_OK;
end
else Result := S_FALSE;
end;

有些不明白,大牛们给讲讲


机器人,这首歌学会了没有?

我们的目标是->没有蛀牙!

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录