lxpbuaa:
 你好:
   《Delphi精要》一书关于设置挂钩判断按键的一段程序我有点不理解。下面这段程序只为了检测出数字键和字母键而不检测其他键吗?
if (lParam and _KeyPressmask)=0 //delphi帮助好象说应为1表示keydown状态then
  begin
      ShiftDown:=(GetKeyState($10)and _KeyPressMask)=_keyPressMask;
      CapsDown:=(GetKeyState($14) and 1)=1;
    if wParam<65 then 
      begin
          if ShiftDown then
           C:=Chr(wParam-16)
          else
            C:=Chr(wParam);//程序到这里只是说明可能是字母0-9吗?       end else
        begin 
          if wParam in [96..105] then 
            C:=Chr(wParam-48)//为什么wParam in [96..105]要减48呢?我对下面的部分不是很理解。希望你能给点说明。
            else if ShiftDown XOR  CapsDown then 
            C:=Chr(wParam)
            else
            C:=Chr(wParam+32);