trichview.support
Re: Emotion icons again |
Author |
Message |
Omar Zelaya |
Posted: 05/13/2005 1:53:43 i have done this doing it on the OnPaste event doing somethign like this(on C++ Builder) DoDefault = false; if (IsClipboardFormatAvailable(CF_TEXT)) { RVE->BeginUpdate(); PasteWithIcons(RVE,Clipboard()->AsText); RVE->EndUpdate(); } "Marcos Lommez" <lommez@hotmail.com> wrote in message news:4282b7e3$1@support.torry.net... > Hi Sergey... > > When a user paste a text on RichViewEdit i wanna to search and replace > icons. > Im using OnPaste event but is not working > > look my code: > > procedure TForm1.rve1Paste(Sender: TCustomRichViewEdit; var DoDefault: > Boolean); > procedure SearchAndInsertIcon(const Code: String; ImageIndex: Integer); > begin > rve1.SetSelectionBounds(0, rve1.GetOffsBeforeItem(0), 0, > rve1.GetOffsBeforeItem(0)); > while rve1.SearchText(Code, [rvseoDown]) do > rve1.InsertBullet(ImageIndex, ImageList1); > end; > > begin > LockWindowUpdate(rve1.Handle); > try > SearchAndInsertIcon(':)', 0); > SearchAndInsertIcon(':|', 1); > SearchAndInsertIcon(':(', 2); > finally > LockWindowUpdate(0); > end; > end; > > |
Powered by ABC Amber Outlook Express Converter