?
Solved

Richedit formatting

Posted on 2006-10-23
4
Medium Priority
?
500 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 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Loops Section Overview
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

839 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