?
Solved

Richedit formatting

Posted on 2006-10-23
4
Medium Priority
?
496 Views
Last Modified: 2013-11-22
I've created a richedit control using the following code:

TitleBoxWindow := Createwindow('RICHEDIT20a','',TitleBoxStyles,TbX[1], TbY[1],TbX[2], Tby[2]-4,ParentWindow,0,hinstance,Nil);

The control creates ok, and I can put text in it, but I need to format selected text and Delphi doesn't recognize the "em_getcharformat" message, or the "tcharformat" type.  Any ideas what I'm doing wrong?
0
Comment
Question by:StatManLV
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 2000 total points
ID: 17793356
add
uses richedit into your uses-clause

the em-messages will then be available

meikl ;-)
0
 

Author Comment

by:StatManLV
ID: 17795360
That's what I thought the problem was, but when I added it to the uses clause it did not fix the problem.  The really odd thing is I deleted it from the uses clause and then re-added it and everything is fine now.  Thanks for the help!!!!
0
 
LVL 4

Expert Comment

by:tobjectpascal
ID: 17796784
What's wrong with the Richedit wrapper?

Problem doing it the good ole win32 way is you have to subclass it, do all the nitty gritty yourself when the wrapper has functionality like

RicheditControl.Seltext:='Sometext';
RicheditControl.Selattributes.Color:=ClRed;

etc etc

0
 

Author Comment

by:StatManLV
ID: 17796864
I'm porting the program from BPW and I have a zillion controls already defined, sized, located, etc., so I didn't want to start over by using the VCL.
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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month13 days, 19 hours left to enroll

800 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