printf("This is the first line\nThis is the second line\n");
in the console app but TextOut does NOT recognise \n as a linefeed character
and the whole thing comes out on one line. Is there a simple way to write
plain text to a view so that multiple lines can be written and the write
position updated automatically? (I have tried CDC:SetTextAlign() but that
only seems to set the horizontal position not the vertical one.)
Am I really going to be forced to calculate and save the position of the
text after every write? It seems a huge overhead just to display a simple
scrolling log.
Thanks for any tips or suggestions as to the simplest way to accomplish
this.
--
Al Blake
Information Technology Manager
Secretariat of the Pacific Community
Noumea, New Caledonia
You should simply use a CEditView to show text. Next best would be a
CEdit...
If there is any reason why you couldn't, you can use CDC::DrawText() instead
of TextOut(). It draws multiline text ("\r\n" is the linefeed token)
cU
--
Dirk Djuga mailto:di...@solaris.stuttgart.netsurf.de
http://djuga.home.ml.org
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Retriever 2.0 is out: http://retriever.home.ml.org
Shareware image viewer, thumbnailer & database
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Al,
Have a look at DrawText. I think that'll do what you want, including
calculating the bounding rectangle extent of the text.
Dave
----
Address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow up email copies.
try to use \n\r or \r\n ... with the EditBox and simple label the \r\n is a
line feed!
Spytech <ain...@hotmail.com> wrote in article
<01bdc4b3$26d62380$2503d8d4@stighy>...