Title: about replace??? Post by: on March 13, 2002, 10:02:23 am Send a Message of EM_SETTEXTEX to richedit or other way???
Title: about replace??? Post by: on March 13, 2002, 10:40:30 pm how did you realize the replace
send a EM_EXLIMITTEXT message to richedit or other way??? which compile did you use??? vc or lcc??? Title: about replace??? Post by: on March 14, 2002, 12:36:35 am There are actually several ways of getting the replace code written. They both need 2 things:
1. An active selection. 2. Replacement text which will replace the selected text. (At this point I am not aware of any way to do it in one SendMessage call, that is to replace text in specific range of characters with a new string. Is there one? ) And I am using GCC compiler on windows, check http://www.mingw.org website for more details on this free compiler. Gena01 Title: about replace??? Post by: on March 14, 2002, 03:19:31 am
thanks a lot !!!! but I real want to known how code of the replacement function??? I use this code following: …… FINDTEXTEX findtext; SETTEXTEX SetTXT; GetDlgItemText(hwnd,IDC_FINDEDIT,(LPTSTR)&FindBuffer,sizeof(FindBuffer)); GetDlgItemText(hwnd,IDC_REPLACEEDIT,(LPTSTR)&ReplaceBuff,sizeof(ReplaceBuff)); findtext.lpstrText=(LPCTSTR)&FindBuffer; SetTXT.flags=ST_SELECTION; SetTXT.codepage=CP_ACP; SendMessage(hwndEdit,EM_EXSETSEL,0,(long)&findtext.chrgText); SendMessage(hwndEdit,EM_SETTEXTEX,(LPTSTR)&settext,(long)&ReplaceBuff); …… but it don't work!why? |