Richedit Help! - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Richedit Help!

I like to convert the following code to work with normal richedit can anyone help?

[code]

if rich.FindText(':)',0,length(rich.text),[stmatchcase]) <> - 1 then
begin

pos1 := rich.FindText(':)',0,length(rich.text),[stmatchcase]);

currenttext:= clipboard.AsText;

clipboard.Assign(smile.Picture); //Put the smile picture in the clipboard

rich.ReadOnly:=false;
rich.SetSelection(pos1,pos1+2,true);

sendmessage(rich.Handle,WM_PASTE,0,0);

rich.ReadOnly:=true;
clipboard.AsText:= currenttext;
end;
[/code]
Slewis
Sign In or Register to comment.