Link to home
Start Free TrialLog in
Avatar of stucox
stucox

asked on

TextOut

I want to use TextOut with the fMode parameter set to TA_UPDATECP. However my newline characters do not work on the printer i.e. they do not update the CP. How do I get newlines/line feeds to work with TextOut?

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of BogdyPtr
BogdyPtr

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jhance
jhance

As noted, you should use DrawText instead.

TextOut is low-level.  If you want to use it and need the newlines etc. to be handled properly, you'll need to fix them yourself.

DrawText is higher level and Windows fixes up special characters for you.
I always though TextOut just called DrawText.  In any case the doco says that it handles TA_UPDATECP.

Correct me if I am wrong but I think the real "problem" is that once you use TA_UPDATECP then you are giving up any "multi-line" capability.  What would a CR be expected to do?