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