Click here to Skip to main content
15,899,314 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a module that generates a wstring output

it has many lines to it and it could be put on the chipboard easy

so can I print it to the main window?
Posted
Comments
Mark Salsbery 24-Jun-11 17:35pm    
Any way you would usually display a wchar_t string should work, but how you do that is going to vary depending on what you are using for UI (console, Win32, Windows Forms, WPF, etc.). SInce you mention WM_PAINT, I'm assuming Win32, so you could use the GDI TextOut() or DrawText(Ex)() functions, use an Edit control, etc. I guess the answer to your question is "yes" :)
VeganFanatic 24-Jun-11 17:47pm    
I am using a standard Win32 type Window.

The string is essentially a large text with many lines, delimited with /n/l
KarstenK 4-Jul-11 7:55am    
Mark is totally right, read the docs about these functions.

=> http://msdn.microsoft.com/en-us/library/dd162499%28v=vs.85%29.aspx

1 solution

use the TextExtOut it will do the job. Use it in a WM_PAINT messagehandler or in OnPaint()

=> http://msdn.microsoft.com/en-us/library/dd162499%28v=vs.85%29.aspx
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900