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
Win32: Error with CreateTextServices
I'm trying to use CreateTextServices function in TextServ.h. It seem I have to link riched20.lib to project to use this function.
But when I add riched20.lib to Linker/Input/Additional Depedencies, VS say error LNK1181: cannot open input file…

NoName
- 7,940
- 13
- 56
- 108
2
votes
4 answers
how to make the richedit not to select or hightlight?
help i wnted the richedit cannot be highlighted/ disable the hightlight or selection of text? also remove the cursor pos. the application is intended for display only the rtf text and not editing so i dont need those features. in delphi

XBasic3000
- 3,418
- 5
- 46
- 91
2
votes
2 answers
How to use EM_INSERTIMAGE?
Using Visual Studio 2013 Community.
Added #include to source code.
Added Shlwapi.lib to linker.
Compile and link OK.
This is the code that uses EM_INSERTIMAGE:
static void insertimage( )
{
RICHEDIT_IMAGE_PARAMETERS rip;
IStream *pStream =…

resander
- 1,181
- 2
- 11
- 15
2
votes
2 answers
How to change background color of margins in RichEdit?
I used the following code to add margins to RichEdit. How can I change their background color?
procedure TForm1.Button1Click(Sender: TObject);
var
LRect: TRect;
begin
LRect := RichEdit1.ClientRect;
InflateRect(LRect, -25, -25);
…

Srdjan Vukmirica
- 743
- 2
- 8
- 22
2
votes
3 answers
How do I add rich text editing support to a web site?
I need some basic CMS functionality with rich text editing. On stack overflow there is a regular textarea edit control, with support for Markdown style syntax formatting. That would be beyond my users, so I want something like a rich edit control…

Rik Heywood
- 13,816
- 9
- 61
- 81
2
votes
4 answers
How to test if a control is a RichEdit control
Most TWinControl descendant in Delphi has an override method CreateParams to define it's subclass such as: 'EDIT', 'COMBOBOX', 'BUTTON', 'RICHEDIT' and etc.
CreateSubClass(Params, 'EDIT');
CreateSubClass(Params, 'COMBOBOX');
CreateSubClass(Params,…

Chau Chee Yang
- 18,422
- 16
- 68
- 132
2
votes
2 answers
How to use a RichEdit control like a console with the Win32 API?
I have a RichEdit control in my simple application that I wish to simulate a console-like display with. I want to be able to have a buffer of x number of lines (say, 300) and whenever a line is added, I would like to also remove the oldest (top)…

Sydius
- 13,567
- 17
- 59
- 76
2
votes
1 answer
RichEdit control stop drawing text when it became a parent for other control
RichEdit control stop drawing text when it became a parent for other control.
Is this a feature or a bug?
Is it possible to make RichEdit to be a parent for other control?
Check out next app:
-- Form1.dfm ---
object Form1: TForm1
Left = 0
Top =…

DmitryB
- 455
- 1
- 5
- 18
2
votes
1 answer
RichEdit needs two clicks to change cursor (caret) position when changing the active form (Delphi)
Here's the setting (I'm using Delphi 7, not sure if this will happen in later/earlier versions):
Create a new project with two forms.
Put a TMemo, a TRichEdit and a TButton on the first form.
Set the Lines properties of both the TMemo and the…

jedivader
- 828
- 10
- 23
2
votes
3 answers
Make child window transparent to user input
Is there a way to make input "pass through" a child window and reach its parent? My problem is this: I'm making custom control with a label that can be formatted. So, rather than trying to re-invent the wheel, I added a RichTextEdit control and…

Xiphias3
- 177
- 11
2
votes
3 answers
Delphi how to import type library for new ITextRange2 type interfaces?
I'm using a Microsoft Text Object Model type library in Delphi for using some features of the Microsoft RichEdit control. That type library was included in a freeware component and worked very well over the years. For example, here is an…
user1917584
2
votes
1 answer
How to fix RichEdit redraw bug in dialogs
I faced a redrawing bug that is not very pleasant to see (Delphi 5, Windows 7 64 bit, Classic theme)
If one creates resizable dialog with client-aligned RichEdit in it and provide the function
procedure TQueryDlg.ShowDialog(const Txt:…

Maksee
- 2,311
- 2
- 24
- 34
2
votes
1 answer
Why I can't insert commas plus spaces in a RichEdit Control (Delphi)
I’m trying to replace a "comma" with "comma + space" using the following code in a procedure called by the OnChange Event on a RichEdit control in Delphi 2010.
SomeString := RichEdit.Lines.Strings[RichEdit.Lines.Count-1];
Position := Pos(',',…

user2364494
- 23
- 2
2
votes
2 answers
how to disable richeditbox vertical scroll
I am using RichEditBox to allow user to enter text (C# Windows 8)
I am also allowing repositioning of the RichEditBox on the screen
But with the touch screen and finger the text is scrolled instead of repositioning the control
If mouse is used, the…

ashish nirkhe
- 689
- 3
- 10
- 22
2
votes
1 answer
Chinese Symbols When Loading Text
I am loading text from text file to richedit but it displays weird Chinese symbols instead, what am I doing wrong?
ms := TMemoryStream.Create;
ms.LoadFromFile('C:\aw.txt');
ms.Seek(0, soFromEnd);
zChar:=#0;
ms.Write(zChar, 1);
ms.Seek(0,…

Tom
- 331
- 2
- 4
- 13