Using the printer, please help. 
Author Message
 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.



Wed, 02 Aug 2000 03:00:00 GMT  
 Using the printer, please help.

Quote:
>Result = SetWindowExtEx(TheDC, GetDeviceCaps(TheDC, LOGPIXELSX),
>GetDeviceCaps(TheDC, LOGPIXELSX), sz);
>Result = SetViewportExtEx(TheDC, GetDeviceCaps(TheDC, LOGPIXELSX),
>GetDeviceCaps(TheDC, LOGPIXELSY), sz);

Italo,

I think you're meant to use setWindowExt to set the arbitrary units
you want to work with. You've set it to the device resolution. Try
something like this:

Result = SetWindowExtEx(TheDC, 100, 100, NULL);
Result = SetViewportExtEx(TheDC, GetDeviceCaps(TheDC, LOGPIXELSX),
                        GetDeviceCaps(TheDC, LOGPIXELSY), sz);

Dave
----
Address is altered to discourage junk mail.
Remove ".---" for the real address.



Thu, 03 Aug 2000 03:00:00 GMT  
 Using the printer, please help.

Thanks I am going to try.

Italo S Weiss



Fri, 04 Aug 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Please help!!!!Please help!!!!Please help!!!!Please help!!!!Please help!!!!Please help!!!!Please help!!!!

2. Please help!!!!Please help!!!!Please help!!!!

3. help with printer dection please

4. Sending coordinates to a Printer - Please HELP!

5. Please help, how to write to the printer spooler

6. BitBlt on a printer DC, Please Help.

7. Please help me set printer margins.

8. HELP - Sending printer codes using C Language

9. Help - send printer codes using C language

10. help using putc to default printer(stdprn)

11. help: Guru needed please please please

12. NEED HELP WITH PRITING AN ARRAY, PLEASE PLEASE HELP

 

 
Powered by phpBB® Forum Software