Solved

Richedit formatting

Posted on 2006-10-23
4
490 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
  • 2
4 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 500 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

707 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now