EM_EXSETSEL bug in msftedit.dll, RichEdit50W

J J 1 Reputation point
2022-12-09T15:49:04.89+00:00

The EM_EXSETSEL message doesn't work properly. In certain (rare) cases, when sending a chrg.cpMin...cpMax range, the cursor gets set to cpMax but no range is selected. Testbed hereindex.php

Note that...
C:\Windows\System32\RichEd20.dll
C:\Program Files (x86)\Common Files\Microsoft Shared\OFFICE11\RichEd20.DLL
C:\Program Files (x86)\Common Files\Microsoft Shared\OFFICE12\RichEd20.DLL

... and probably other have no such problems.

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,074 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Jeanine Zhang-MSFT 5,981 Reputation points Microsoft Vendor
    2022-12-12T02:15:41.377+00:00

    Hello,

    Welcome to Microsoft Q&A!

    According to your description:
    It turns out this bug has been fixed in Windows 10. However, software should be backwards compatible at least to Windows 7 IMHO (I don't really care for XP, although I loved it).

    In my opinion, I still suggest you update the system to win10 or win11.

    If you want to Microsoft fix the issue in win7, I'd suggest you could submit a feedback/feature request about this API/feature in the Feedback Hub. You could find the Feedback Hub in the Start Menu. Please select Developer Platform->API Feedback as the category when you submit your request. The related team will check the request.

    Thank you.

    Jeanine


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. J J 1 Reputation point
    2023-01-18T16:32:52.2533333+00:00

    Update:

    My editor is now running more or less fine on Win7 with Sys32\msftedit.dll, but on Win10...

    • with the Office12 dll, it hangs for one big (2.7 MB) document
    • with the original Win10 msftedit.dll it works, but it loads very, very slowly
    • with the Win7-64 msftedit.dll it works fine, a factor 5 (!) faster than the Win10 dll

    So the new improved and possibly bug-free msftedit.dll is about 4 times more bloated than the Win7 version and loads documents a factor 5 slower. That's progress, congrats.

    I will have to use the buggy Win7 version on Win10. It works, but occasionally, and only on big documents (>1MB), it inserts strange characters for no particular reason, and that insertion cannot be undone with Ctrl Z. Lovely ;-)

    It's really a shame that Microsoft neglects the only control that is/should be able to use formatted text.

    0 comments No comments