I've tried using RichTextBox on C#, and found it too slow to work with for text thousands of lines of long. After some googling, I found this is because .net by default uses RichEdit 2.0, and a solution is to use RichEdit 5.0 instead.
C# RichEditBox has extremely slow performance (4 minutes loading) SOLVED
It worked fine, with the text displaying in seconds rather than minutes. However, being the kind of person that doesn't care about compatibility in a personal project, I wanted to find later versions of RichEdit. I found out that the latest version is 8.0, the whole of which shipped as riched20.dll, and partially in msftedit.dll.
http://blogs.msdn.com/b/murrays/archive/2006/10/14/richedit-versions.aspx
http://blogs.msdn.com/b/murrays/archive/2012/03/03/richedit-8-0-preview.aspx
However, documentation at msdn stops with 4.1, with (who I assume is) a dev on the project claiming they no longer do public documentation in the blog above.
https://msdn.microsoft.com/en-us/library/windows/desktop/bb787873(v=vs.85).aspx
So far I've been able to run msftedit.dll's RichEdit 2.0 and 5.0 explicitly, but all other versions elude me. For example, despite John Crenshaw's comment claiming RichEdit 6.0 works fine, I have not been able to use it. Any attempt other than the msftedit-2.0 and 5.0 combination mentioned above results in a "Window class name is not valid" error at Application.Run(). (The program is in C#, but I did not tag it as such as I feared this problem might not be a C# specific problem.) The code is a near exact copy of the solution in the first link and is as follows:
class Textbox : RichTextBox
{
[DllImport("kernel32.dll", EntryPoint = "LoadLibraryW", CharSet = CharSet.Unicode, SetLastError = true)]
private static extern IntPtr LoadLibraryW(string s_File);
public static IntPtr LoadLibrary(string s_File)
{
IntPtr h_Module = LoadLibraryW(s_File);
if (h_Module != IntPtr.Zero)
return h_Module;
int s32_Error = Marshal.GetLastWin32Error();
throw new Exception("LoadLibrary Failed with: "+s32_Error);
}
protected override CreateParams CreateParams
{
get
{
CreateParams i_Params = base.CreateParams;
try
{
// Available since XP SP1
LoadLibrary("MsftEdit.dll"); // throws
i_Params.ClassName = "RichEdit50W";
}
catch
{
// Windows XP without any Service Pack.
}
return i_Params;
}
}
What I've done is to change the ClassName string to different numbers, e.g. RichEdit60W.
I am on Windows 8.1, so msftedit.dll should have up to RichEdit 7.0 or 8.0 (the wording given in the blog post is unclear), yet I am unable to reach them. Is there any way to correct this, or are the newer versions confidencial?