[Gena01 Logo]
November 23, 2024, 01:54:00 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Tags Login Register  
Pages: [1]
  Print  
Author Topic: about replace???  (Read 63329 times)
0 Members and 1 Guest are viewing this topic.
Guest
« on: March 13, 2002, 10:02:23 am »

Send a Message  of EM_SETTEXTEX to richedit or other way???
Logged
Guest
« Reply #1 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???
Logged
Guest
« Reply #2 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
Logged
Guest
« Reply #3 on: March 14, 2002, 03:19:31 am »

Quote (Gena01 @ Mar. 14 2002,00:36)
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

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????
Logged
Tags:
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines | Sitemap Valid XHTML 1.0! Valid CSS!