Solved

Richedit formatting

Posted on 2006-10-23
4
494 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 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Simple Delphi Question 9 105
select query - oracle 16 101
Multiple image collision 13 88
Create a path if not exists 7 108
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…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

733 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