SetWindowsHookEx(KEYBOARD) failed.. moving all dockable windows

  • Andrzej Kmicic
    Andrzej Kmicic

    This question is asked on the forum for bugs in plugins. This Problem does not concern only the plug-ins but all dockable Windows in Notepad + +.
    In some installations, Windows7 what any docking attempt ends in failure with the message system on SetWindowsEx or gripper starter error (createwindowsEx grip).

    This is very strange. On my Win7 is installed the last current version Notepad++ and there is no problem. At my friend (who always advises me when trouble) how any contact of the mouse ends (for docked any dockable windows /example character table/) generate the same error.

    Please respond and help me, what is this error and how to fix this.

    Wojtek Jarzęcki

  • Loreia2

    Hi Wojtek,

    it looks like some sort of Windows XP issue. This is the code that fails:

    if (ver < WV_VISTA)
        hookKeyboard = ::SetWindowsHookEx(WH_KEYBOARD, (HOOKPROC)hookProcKeyboard, _hInst, 0);
        if (!hookKeyboard)
            DWORD dwError = ::GetLastError();
            TCHAR  str[128];
            ::wsprintf(str, TEXT("GetLastError() returned %lu"), dwError);
            ::MessageBox(NULL, str, TEXT("SetWindowsHookEx(KEYBOARD) failed"), MB_OK | MB_ICONERROR);

    Can you copy here entire message, it would be really helpful to see windows error code.


  • Andrzej Kmicic
    Andrzej Kmicic

    Wow ...

    Where this fragment to paste codes?. This error is not related to the any plugin. Each dockable window in Notepad ++ after touched the mouse generates an error and the system hangs.
    If you have the tools to build N + and you could do for me with this code that you pasted and this compilation it please share the exe file on the Web (link).
    or send link to adress. l o t t o c a d (a t) g m a i l (d o t) c o m



  • Don HO
    Don HO

    This issue is fixed here:

    Could you confirm me if this issue is fixed for you?