LoadRichEdit50W function

Requires: GfaWinx.lg32

Purpose

Loads msftedit.dll to create a RichEdit50W class richedit control.

Syntax

fSuccess? = LoadRichEdit50W

fSuccess?: boolean

Description

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.

Example

$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

Remarks

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.

See Also

RichEdit

{Created by Sjouke Hamstra; Last updated: 07/03/2022 by James Gaite}