Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#3720 clicking on the document map separator raises error

open
nobody
5
2012-11-13
2012-03-30
Anonymous
No

mouse clicking on the separator between the document and the document map shows an error dialog reading:

SetWindowsHookEx(MOUSE) failed
GetLastError() returned 1428

Discussion


  • Anonymous
    2012-03-30

     
    Attachments

  • Anonymous
    2012-03-30

    I was using version 6.0 and windows 8 64bit

     
  • devJohn
    devJohn
    2012-04-18

    I can confirm this with both the 32bit and 64bit versions of the Windows 8 consumer preview. Another way to replicate the issue is to execute a "Find all in current document" and trying to resize or undock the sub window.

    The issue resides in the OS version detection only detecting relevant OS versions up to Windows 7. That is caused by instances of this:
    hookMouse = ::SetWindowsHookEx(ver >= WV_W2K?WH_MOUSE_LL:WH_MOUSE, (HOOKPROC)hookProcMouse, _hInst, 0);

    The fixes that I have done are:
    ----------------------------------------

    /PowerEditor/src/Parameters.cpp:

    Within the getWindowsVersion function @ ln 554 in 6.1.1 src -

            if \( osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 2 \)
            \{
                return WV\_WIN8;
            \}
    

    ----------------------------------------

    /PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h

    In main declarations @ ln 42, the enum is changed to -

    enum winVer{WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, WV_S2003, WV_XPX64, WV_VISTA, WV_WIN7, WV_WIN8};

    ----------------------------------------

    This is based off of a community note listed in the MSDN document "ms724832" for the Consumer Preview's revision numbers. I'm uncertain if this is finalized information, so I've not submitted this as a formal patch. Perhaps the fallback for WV_UNKNOWN should be of a higher value to use the Win2K+ safe SetWindowsHookEx as versions 95 and up are defined.

     
  • Karl Waclawek
    Karl Waclawek
    2012-06-28

    I can confirm this issue.