Print Preview problem
I made a dialog application that draws text into the window using the device context:
I also made an option in which you can change the font. But when you choose the print preview it is all messed up. Depending on what font size you choose it shows the letters overlapping each other or too far away from each other in the print preview.
CDC* pCD = GetDC();
pDC->TextOut(x, y, "some text I want to print");
Anyway to fix this?
Check out the Justify function in Petzold's 5th edition, Text and Fonts chapter. I believe this may be what you need.
Can't find the book anywhere. Can you please tell me where the trick is?
Check out this Sample Chapter under the Simple Text Formatting header.
It seems I need to convert between logical pixel and physical pixel in the OnPrepareDC function. But I just figure it out. Can anyone help me please?