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
2
votes
1 answer
Delphi - FastReport send contents of richEdit
I've tried to send the text of my Rich Edit to FastReport so that I can save the output as a PDF.
I used the OnGetValue
procedure TfrmEmediaInvoice.frxReport1GetValue(const VarName: string;
var Value: Variant);
begin
value :=…

Brent Coetzee
- 31
- 3
2
votes
6 answers
Delphi. Analog of Memo/RichEdit
Does anybody know if there is an analog of Memo/RichEdit? Demand: to number lines, to load big files (more than 5 MB) from a stream.

Michael
- 475
- 2
- 9
- 17
2
votes
1 answer
How to save and then restore vertical scroll position in RichEdit
I am trying to save and then restore the vertical scroll position in RichEdit.
A global var to store scroll pos:
SI: TScrollInfo;
This code saves the scroll position:
FillChar( SI, SizeOf(SI), #0 );
SI.cbSize := SizeOf(SI);
SI.fMask :=…

Max Smith
- 395
- 1
- 2
- 13
2
votes
1 answer
How to upgrade _RICHEDIT_VER (riched20.dll) to version 3 or higher
I am using for a C++ LIbrary WTL10 from Microsoft. If i want to compile it in VS19, i will get an error, that says WTL10 requieres Richedit version 3 or higher.
Here is the code from atlctrls.h
#if (_RICHEDIT_VER < 0x0300)
#error WTL10 requires…

hkn27
- 51
- 5
2
votes
0 answers
Problems with rich edit rendering certain unicode characters
Have a Windows program (MFC, MBCS) that uses a RichEdit 2.0 controls (as basically a CRichEditView. When I set the text of the control for a string on Windows 10, the string renders correctly, but on lesser versions, say Server 2016, there is a…

Joseph Willcoxson
- 5,853
- 1
- 15
- 29
2
votes
1 answer
WPF shortcuts are activating when typing in HwndHost parented rich edit control
I am writing a WPF app that wraps up a legacy MFC richtext editor. I have wrapped the richtext editor in a HwndHost. The HwndHost control sits alongside a WPF TabControl.
Screenshot of running app at http://www.kempy.co.uk/code/Test.png
Apart…

Tim
- 91
- 1
- 7
2
votes
1 answer
Managing paragraph Tab settings in a tRichEdit - Delphi
I am working with a tRichEdit component and using a tSpinedit to determine tab spacings using the trichedit.oncreate event to generate an array of tab positions to begin with. This is working fine and each new paragraph I generate uses the defined…

Ashlar
- 636
- 1
- 10
- 25
2
votes
2 answers
Spurious '\r' added by CRichEditCtrl::GetLine() when called on single-character lines?
I tried using CRichEditCtrl::GetLine() to retrieve the text of a given line of a rich-edit control in an MFC application built with VS2015 in Unicode mode, and running on Windows 10.
I wrote this helper function:
CString GetLine(CRichEditCtrl&…

Mr.C64
- 41,637
- 14
- 86
- 162
2
votes
1 answer
How to left/right align lines in rich edit (Delphi)?
Is there a way I can align the line left or right in the TRichEdit component?
Clarification
I wish to align only a portion of the text, not all of it.

Nasreddine Galfout
- 2,550
- 2
- 18
- 36
2
votes
1 answer
TEXTMETRIC is giving wrong height when resizing text with mouse wheel
I'm calculating the number of lines in a rich edit control.
Currently I'm using next code
TEXTMETRIC tm; {
HDC hdc = GetDC(hwndRichEdit);
GetTextMetrics(hdc, &tm);
ReleaseDC(hwndRichEdit, hdc);
}
RECT…

Lionishy
- 188
- 1
- 2
- 10
2
votes
2 answers
Temporaily disabling the C# Rich Edit undo buffer while performing syntax highlighting
I already have a pretty decent syntax highlighter in my Rich Edit control but I have one final problem before it is fully useful:
Whenever I run the syntax coloring it records those coloring actions in the undo buffer, which I do not really want. Is…

Andos
- 202
- 3
- 12
2
votes
1 answer
Print: Wrong bottom margin
I'm printing an edit control - by first copying its contents to a rich edit control (2.0 at least - could be rich edit 3.0) - and then printing from there.
I've got it all working... but the margins are sloppy / incorrect.
I've gone over the code…

Mordachai
- 9,412
- 6
- 60
- 112
2
votes
2 answers
RichEdit does not process hyperlinks
I want my RichEdit to process hyperlinks, so I followed the instructions on: http://delphi.about.com/od/vclusing/l/aa111803a.htm
Here are the changes I made to the code:
interface
type
TProgCorner = class(TForm)
RichEdit2: TRichEdit;
…

Johan
- 74,508
- 24
- 191
- 319
2
votes
2 answers
How android span act on input characters in EditText
I want to implement a effect that control input characters in edittext whether use span.
For example, in EditText can use
getEditableText().setSpan(new StyleSpan(Typeface.NORMAL), 0, 1, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
make selected characters be…

nebulae-pan
- 54
- 5
2
votes
1 answer
TRichEdit and URL highlighting problems
I am using the current code to highlight URLs on a TRichEdit:
procedure TForm1.WndProc(var Message: TMessage);
var
p: TENLink;
strURL: string;
begin
if (Message.Msg = WM_NOTIFY) then
begin
if (PNMHDR(Message.lParam).code = EN_LINK) then
…

Jessica
- 2,005
- 4
- 28
- 44