Requires: GfaWinx.lg32
Loads msftedit.dll to create a RichEdit50W class richedit control.
fSuccess? = LoadRichEdit50W
fSuccess? | : boolean |
By default, the runtime loads RichEd20.dll when the program creates a RichEdit Ocx control and the most recent rich edit control supported by this DLL is version 3.0. However, Windows supports a newer version (4.1) which resides in the system’s msftedit.dll. Using the LoadRichEdit50W function the runtime’s loading is overruled to load msftedit.dll and create a RichEdit50W class richedit control.
The msftedit.dll library is automatically uninstalled at the termination of the calling application.
$Library "gfawinx"
If !LoadRichEdit50W()
MsgBox0 "Failed to load msftedit.dll. Falling back to RichEdit version 3.0 (RichEd20.dll)"
EndIf
OpenW 1
Ocx RichEdit rtf = , 0, _Y / 2, _X, _Y / 2
Do
Sleep
Loop Until Me Is Nothing
An application cannot use both versions of the rich edit control; either RichEd20.dll or msftedit.dll is loaded. Any properties and/or methods that need to be modified are properly updated after using LoadRichEdit50W.
LoadRichEdit50W will probably never fail, because msftedit.dll is a Windows system file and should be present on all versions of Windows since Windows XP.
{Created by Sjouke Hamstra; Last updated: 07/03/2022 by James Gaite}