How to prevent the user from editing COM objects in TRxRichEdit?

I use TRxRichEdit component in my application to make a chat with emoticon. Everything looks fine but the user can click the emoticon image and resize it using anchors on the image borders or doubleclick the image and edit it. I want to prevent the user from this (like in MSN Messenger). I discovered MSDN and didn't find any help yet.

Many thanks
msa
LVL 5
msa2003Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Imthiyaz_phCommented:
could plz explain how u r inserting the emoticons?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
msa2003Author Commented:
Now I use the following code to generate RTF-encoded DIB from bitmap (like it is described in Rich Text Format reference from Microsoft):

unit URTF;

{
  Source:   http://www.delphi3000.com/articles/article_1819.asp
}

interface
uses
  SysUtils,
  Classes,
  Graphics;

  function BitmapToRTF(pict: TBitmap): String;

implementation

function BitmapToRTF;
var
  bi,bb,rtf: string;
  bis,bbs: Cardinal;
  achar: ShortString;
  hexpict: string;
  I: Integer;
begin
  GetDIBSizes(pict.Handle,bis,bbs);
  SetLength(bi,bis);
  SetLength(bb,bbs);
  GetDIB(pict.Handle,pict.Palette,PChar(bi)^,PChar(bb)^);
  rtf := '{\rtf1 {\pict\dibitmap0 ';
  SetLength(hexpict,(Length(bb) + Length(bi)) * 2);
  I := 2;
  for bis := 1 to Length(bi) do
  begin
    achar := IntToHex(Integer(bi[bis]), 2);
    hexpict[I-1] := achar[1];
    hexpict[I] := achar[2];
    Inc(I,2);
  end;
  for bbs := 1 to Length(bb) do
  begin
    achar := IntToHex(Integer(bb[bbs]), 2);
    hexpict[I-1] := achar[1];
    hexpict[I] := achar[2];
    Inc(I,2);
  end;
  rtf := rtf + hexpict + ' }}';
  Result := rtf;
end;

end.

Then I use TStringStream and TRichEdit.LoadFromStream to replace the selection with emoticon.

Previously I tried to use RTF's encoded by WordPad with inline object (MS Paint). When I use DIB instead of inline object, there is no opportunity to edit image with Paint but the user still can drag the picture's bounds resizing it.
0
msa2003Author Commented:
Now the question title should look like "How to prevent the user from resizing DIBs in TRxRichEdit?", so I'll accept the Imthiyaz_ph's comment and repost the question.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.