Home > Software engineering >  Youdao dictionary for child Windows keyboard hook, the callback function is not called, what's
Youdao dictionary for child Windows keyboard hook, the callback function is not called, what's

Time:10-23

According to the online posts only made a VC MFC hook Dll, and then set up a app project to call the hook to the interface,
In the Dll using the SetWindowsHookEx hook to obtain an application, the program can obtain the notepad or calculator so single thread hooks, and in time, such as for WH_MOUSE and WH_KEYBOARD SetWindowsHookEx install the callback function can be called (set breakpoints in the callback function, look to whether can interrupt),
But, in my attempt to youdao dictionary such procedures when the hooks to the problem, I get the parent window handle youdao dictionary (through FindWindow), then use the EnumChildWindows interface to obtain the handle to each window, and then found it edit box handle, the handle as shown in the figure below:

This class named after the child window handle to obtain Edit, I'll use SetWindowsHookEx mouse and keyboard hook to get the child window, after the hook success, I operate youdao dictionary callback function is not called, don't know is what reason,

CodePudding user response:

Now have a HOOK is not the cause of the callback may sometimes be soft block kill, or software processing, or a lot of reasons, I remember good youdao Ming is based on the CEF, this should need more treatment, the activation of the hooks, try a different message

CodePudding user response:

Can you speak a little bit more clear, upstairs program based on CEF can HOOK, how to HOOK, HOOK activation type is what mean

CodePudding user response:

Tested, with spy++ also can not get the news of the edit box,
May be what you want to bind the wrong,

CodePudding user response:

WinAPIOverridehttp://jacquelin potier. Free. Fr/winapioverride32/
  • Related