Please help me. I figured out how to print but whenever a newline character is supposed to print, it prints two square boxes. How would I go about fixing that?
You could use DrawText() instead, which is much more powerful but much less efficient.
You could also process the string yourself. When you encounter a newline, print only up to one less than the newline, then reset your pointer to AFTER the newline, move your X-coord variable back to 0, add the line height to your Y-coord variable, then search again for a newline or a terminating null.
To get the line height, use the GetTextMetrics() API. Add the tmHeight and tmExternalLeading returned by GetTextMetrics together to get the line height.
Or like I said you could just use DrawText... "Information has a tendency to be free. Which means someone will always tell you something you don't want to know."
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.