Link to home
Start Free TrialLog in
Avatar of StatManLV
StatManLV

asked on

Richedit formatting

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?
ASKER CERTIFIED SOLUTION
Avatar of kretzschmar
kretzschmar
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of StatManLV
StatManLV

ASKER

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!!!!
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

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.