Solved

Selecting all text in Richedit

Posted on 1997-07-20
1
284 Views
Last Modified: 2013-11-22
How do I select all the text in Richedit,
when using RichEdit.SelecAll; nothing happens.
0
Comment
Question by:hellfire052497
1 Comment
 
LVL 4

Accepted Solution

by:
erajoj earned 10 total points
ID: 1339316
Simply:

  SendMessage(RichEdit1.Handle, EM_SETSEL, 0,
    SendMessage(RichEdit1.Handle, EM_GETLIMITTEXT, 0, 0)-1
  );

or even simpler:

  SendMessage(RichEdit1.Handle, EM_SETSEL, 0, MaxInt);

/// John

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question