Questions involving the Windows Rich Edit control. This tag also applies when using wrappers around the underlying Rich Edit control (e.g. RichTextBox in WinForms, TRichEdit in VCL, RichEditBox in WinRT) when attempting to operate with the underlying control, or using features of the control.
Questions tagged [richedit]
285 questions
7
votes
6 answers
contentEditable cursor position/style in FireFox
I'm having trouble using contentEditable in FireFox 3. I have a problem where the cursor will appear above or only partially in the div after I click in it (until I start typing at which time it behaves correctly). Any ideas on how I can stop this…

Ben McCann
- 18,548
- 25
- 83
- 101
7
votes
3 answers
How to change underlining color in a Rich Edit control (Win32/C)
I’m looking for a way to make red squiggly underlining in a Rich Edit control (I’m using version 4.1 with Msftedit.dll). I’m able to produce squiggly underlining with this code :
CHARFORMAT2 format;
format.cbSize = sizeof(format);
format.dwMask =…

anno
- 5,970
- 4
- 28
- 37
6
votes
1 answer
Mfc Font binding and Rich Edit Control RICHEDIT50W does not display Unicode Properly
Latest update:
Well, I found a culprit of some sort. I changed the control to RichEdit20W from the 50W and it displays the Hangul (Korean) now. I did not have to change any other code except for the init, added AfxInitRichEdit2(), and commented out…
user557597
6
votes
1 answer
Get version of rich edit library
ALL,
Is it possible to get the version of the RichEdit control the program uses?
| Version | Class name | Library | Shipped with | New features
|------------|---------------|--------------|-----------------|
| 1.0 |…

Igor
- 5,620
- 11
- 51
- 103
6
votes
1 answer
Richeditor Onlyoffice edit & save document
I need to load MSWord file into embedded editor (onlyoffice), modify it, then upload to my server as MSWord file.
I've already installed onlyoffice on my PC.
https://api.onlyoffice.com/editors/demopreview#text
When i run JavascriptExample and press…

Didar Burmaganov
- 640
- 1
- 8
- 22
6
votes
3 answers
Detect click on URL in RichEdit
I am trying to update RichEdit so that it detects URL and enables clicking on it to open in the browser. Detecting URL is easy, I just use the following code from http://www.scalabium.com/faq/dct0146.htm
mask := SendMessage(MNote.Handle,…

Tofig Hasanov
- 3,303
- 10
- 51
- 81
5
votes
4 answers
Rich Edit Control in raw Win32
Is the documentation for Rich Edit Controls really as bad (wrong?) as it seems to be? Right now I'm manually calling LoadLibrary("riched20.dll") in order to get a Rich Edit Control to show up. The documentation for Rich Edit poorly demonstrates…

user16408
- 53
- 1
- 5
5
votes
3 answers
Getting unformatted text from RichEdit
I have a Richedit that allows my users to format and view error messages that display within my application.
I now need to be able to export the text only (no formatting) out to another database that their trouble-ticket system uses.
I have tried…

Steve
- 640
- 1
- 7
- 19
5
votes
3 answers
Rich edit control sends EN_CHANGE when spellcheck underline appears
Let's say you've just set some text in a spellcheck-enabled rich edit control, and the text has some spelling errors. A split second will go by, spellcheck will kick in, and then the misspelled text will get underlined. But guess what: the rich…
user15025873
5
votes
3 answers
Display of Asian characters (with Unicode): Difference in character spacing when presented in a RichEdit control compared with using ExtTextOut
This picture illustrates my predicament:
All of the characters appear to be the same size, but the space between them is different when presented in a RichEdit control compared with when I use ExtTextOut.
I would like to present the characters the…

Coder_Dan
- 1,815
- 3
- 23
- 31
5
votes
1 answer
EM_GETTEXTEX - wrongly documented return value?
According to MSDN, EM_GETTEXTEX returns the following:
The return value is the number of TCHARs copied into the
output buffer, including the null terminator.
Now take a look at the following code:
GETTEXTLENGTHEX gtl;
GETTEXTEX gt;
int len;
TCHAR…

Andreas
- 9,245
- 9
- 49
- 97
5
votes
3 answers
How to insert hyperlink without underline to Win32 RichEdit?
I added a link to RichEdit, use CFM_LINK/CHARFORMAT2 structure. But I can't figure out how to remove the underline effect. I tried:
SendMessage(richEditHWND, EM_AUTOURLDETECT, FALSE, NULL);
SendMessage(richEditHWND, EM_SETEDITSTYLEEX, 0,…

NoName
- 7,940
- 13
- 56
- 108
5
votes
1 answer
Why doesn't EM_SETTEXTMODE work?
I'm trying to use EM_SETTEXTMODE on a RichEdit control in Delphi 7.
Just create a new project, add a TRichEdit control and a TButton control and add the following code to the button's click handler:
SendMessage(RichEdit1.Handle, WM_SETTEXT, 0,…

jedivader
- 828
- 10
- 23
5
votes
1 answer
Delphi: TRichEdit Text in non-default non-Unicode system language as String (ANSI)
So here's the setup:
Make a new Delphi 7 application with a TRichEdit control on it. We are talking non-Unicode applications here.
Install a new Input language in Windows' Regional and Language Options, that has a different encoding from the…

jedivader
- 828
- 10
- 23
5
votes
1 answer
Why am I getting RichEdit line insertion error when I call Delete in OnChange event?
I've googled and checked many places for a solution, but all cases I found differed or involved something more advanced than simply adding or deleting lines. Basically, I want to make a sort of scrolling rich edit (alternative would be moving the…

Raith
- 851
- 4
- 12
- 25