
Using the printer, please help.
I would like to be able to print to the normal and a printer DC without
having to modify my code.
Example:
If a draw a line:
MoveToEx (TheDC, 10, 10, pt);
LineTo (TheDC, 100, 10);
the result should be the same on a printer DC and a normal DC. This is what
i am doing. Please help me modify the following code to get the result i
need.
OldMap = SetMapMode(TheDC, MM_ISOTROPIC);
Result = SetWindowExtEx(TheDC, GetDeviceCaps(TheDC, LOGPIXELSX),
GetDeviceCaps(TheDC, LOGPIXELSX), sz);
Result = SetViewportExtEx(TheDC, GetDeviceCaps(TheDC, LOGPIXELSX),
GetDeviceCaps(TheDC, LOGPIXELSY), sz);
I am not sure but i think this is what i should be doing. Change the mapmode
to MM_ISOTROPIC and change the window and viewport ext to the
GetDeviceCaps(TheDC, LOGPIXELSX) and GetDeviceCaps(TheDC, LOGPIXELSY) .
Please let me know what i am doing wrong, the result comes out different on
the printer and monitor.
Thanks Italo S Weiss.