我现在需要钩一个外部程序的WM_IME_NOTIFY消息,但是不知道WM_IME_NOTIFY属于哪种HOOK类型

解决方案 »

  1.   

    确实是WH_GETMESSAGE,你也可以这样
                          注册全局钩子 
                                 | 
                       
                    |      钩子函数     | 
    如果是WM_IME_COMPOSITION        如果是WM_CHAR
      

  2.   

    不对呢function keyHookProc(nCode: Integer; WParam: WPARAM; LParam: LPARAM): LRESULT;
      stdcall;
    const
      _KeyPressMask = $80000000;
    begin
      Result := 0;
      if nCode < 0 then
      begin
        Result := CallNextHookEx(hhk, nCode, wParam, lParam);    Exit;
      end
      else
      begin
        case Wparam of
          WM_IME_NOTIFY:begin
            MessageBox(0, 'ok','',MB_OK);
          end;
        end;
      end;end;不能弹出OK对话框
      

  3.   

    呵呵,我再告诉你,是用WH_CALLWNDPROC