News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

RichEdit 4.1

Started by John Z, October 29, 2025, 02:45:46 PM

Previous topic - Next topic

John Z

Please consider adding Richedit4.1 to the control tool box in a future version release.
It uses the newer RTF DLL Msftedit.dll.

Calling syntax:
    HWND hwndEdit= CreateWindowEx(0, MSFTEDIT_CLASS, TEXT("Type here"),
        ES_MULTILINE | WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP,
        x, y, width, height,
        hwndOwner, NULL, hinst, NULL);

John Z

TimoVJL

Meanwhile:
It is possible to add richedit 4.1 to dialog via custom control or add richedit control and change classname to "RichEdit50W"
and LoadLibrary("Msftedit.dll");
May the source be with you

Vortex

Hi Timo,

We can create an import library for this dll. The Masm64 and Msys2 setups are providing the library.
Code it... That's all...

TimoVJL

#3
Sure we can.

Also make just a ref
#pragma comment(lib, "msftedit.lib")
int CALLBACK DllGetVersion(void *p);

FARPROC pDllGetVersion = (FARPROC)DllGetVersion;

msftedit.def for x86
LIBRARY msftedit.dll
EXPORTS
_IID_IRichEditOle DATA
_IID_IRichEditOleCallback DATA
_IID_ITextServices=IID_ITextServices DATA
_IID_ITextHost DATA
_IID_ITextHost2 DATA
_CreateTextServices@12=CreateTextServices
_REExtendedRegisterClass@0=REExtendedRegisterClass
_RichEditANSIWndProc@16=RichEditANSIWndProc
_RichEdit10ANSIWndProc@16=RichEdit10ANSIWndProc
_SetCustomTextOutHandlerEx
_DllGetVersion@4=DllGetVersion
_RichEditWndProc@16=RichEditWndProc
_RichListBoxWndProc@16=RichListBoxWndProc
_RichComboBoxWndProc@16=RichComboBoxWndProc

msftedit.def for x64
LIBRARY MSFTEDIT.dll
EXPORTS
IID_IRichEditOle DATA
IID_IRichEditOleCallback DATA
IID_ITextServices DATA
IID_ITextHost DATA
IID_ITextHost2 DATA
CreateTextServices
REExtendedRegisterClass
RichEditANSIWndProc
RichEdit10ANSIWndProc
SetCustomTextOutHandlerEx
DllGetVersion
RichEditWndProc
RichListBoxWndProc
RichComboBoxWndProc
May the source be with you

John Z

Thanks Timo!  👍👍👍

Grabbed them.

I would not be surprised to see Richedit 1 and 2 depreciated in the near future.
Win 11 notepad already uses 4.1.

John Z

Vortex

Hi Timo,

In your def file, you don't need the equates :

_CreateTextServices@12=CreateTextServices
This line should be enough :

_CreateTextServices@12
Code it... That's all...

TimoVJL

Yes, you are right.
Just an old habit for dll defs.
May the source be with you