A common question in the forums in the past has been how do I break up a long
string and print it using the standard MFC architecture. Above is an example project that does just that. You can enter a long
string to print in a MultiLine edit control. To see what the output would be like for your printer, you can select the Print Preview option from the file menu.
There are some drawbacks in the example in that it doesn't handle tabs correctly as it only uses
CDC::TextOut() when printing, and
CDC::GetTextExtent() when measuring whether the currently selected line will fit in one line, or needs to be broken up across multiple lines. This can be changed by yourselves as a programming exercise using the
I hope this example will help out beginners at printing.
A research and development programmer working for a pharmaceutical instrument company for the past 17 years.
I am one of those lucky people who enjoys his work and spends more time than he should either doing work or reseaching new stuff. I can also be found on playing DDO on the Cannith server (Send a tell to "Maetrim" who is my current main)
I am also a keep fit fanatic, doing cross country running and am seriously into [url]http://www.ryushinkan.co.uk/[/url] Karate at this time of my life, training from 4-6 times a week and recently achieved my 1st Dan after 6 years.