Writing apps for Windows (or XWindows) needn't involve such such
low-level tasks as writing an editor. There are methods available that
do virtually everything you need with editing. For example, simply
purchasing Winteracter and using one subroutine call lets you open an
editing window with most all the features you know and love, including
RTF, access to the Windows printer dialogs, file i/o dialogs, cut,
paste, DDE, whatever. One week of my time is worth a lot more than the
cost of Winteracter, which also comes with full graph and graphics
support, grid and dialog management, ODBC data connectivity, 3D
modelling, graphics editor, help system constructor aid, Windows
resource editor, Full Fortran-friendly text editor, Integrated
Development Environment, installation builder, full OpenGL
connectivity, and so on... .
There are other libraries and components available to do the same
things, I just know that the Winteracter edit windows work fine for me.
To burden my users with a cobbled-together, primitive text editor would
be insulting to them. They aren't used to such a thing :-).
OTOH, I have done such things in the past (under DOS). I don't use
those apps any more.