trichview.support
Re: Use SendMessage to insert a word to TRichViewEdit |
Author |
Message |
Gorden Peng |
Posted: 11/14/2004 17:56:43 When I try another way, I find if I use below code it can work on RICHVIEWEDIT: {--------------------------------------------------------} procedure InsertSymbol(str:string); var i: integer; begin if (screen.Forms[1].ActiveControl is TCustomEdit) or (screen.Forms[1].ActiveControl is TCustomDBGrid) or (screen.Forms[1].ActiveControl is TRichViewEdit) then begin if not (screen.Forms[1].ActiveControl is TCustomRichEdit) then begin for i:=1 to Length(str) do SendMessage(screen.Forms[1].ActiveControl.Handle, WM_IME_CHAR, integer(str[i]), 0); end; end; end; {-----------------------------------------------------------} Thank you. "Gorden Peng" <peng@mail.nsysu.edu.tw> wrote: > >In my case, I provider user a custom symbol, Then user can choose they need >symbol to inert to richviewedit. > >I will send my demo program to you in email. > > >"Sergey Tkachenko" <svt@trichview.com> wrote: >>TRichViewEdit does not support EM_REPLACESEL. >> >>Is it necessary for you? Why? >> >> > |
Powered by ABC Amber Outlook Express Converter