News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Send multiple page to printer

Started by Farabi, July 31, 2010, 02:09:28 AM

Previous topic - Next topic

Farabi

Anyone know how to send multiple page to a printer?
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

clive

Quote from: Farabi on July 31, 2010, 02:09:28 AM
Anyone know how to send multiple page to a printer?

Pretty much the same way you send one page, create a device context, paint to it, and send it out

PrintDlg
StartDoc
StartPage
EndPage ;1
EndPage ;2
EndPage ;3
..
EndPage ;n
EndDoc
DeleteDC
It could be a random act of randomness. Those happen a lot as well.

Farabi

Quote from: clive on July 31, 2010, 03:06:31 AM
Quote from: Farabi on July 31, 2010, 02:09:28 AM
Anyone know how to send multiple page to a printer?

Pretty much the same way you send one page, create a device context, paint to it, and send it out

PrintDlg
StartDoc
StartPage
EndPage ;1
EndPage ;2
EndPage ;3
..
EndPage ;n
EndDoc
DeleteDC

How to make the page selection enabled?
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

clive

Quote from: Farabi
How to make the page selection enabled?

Are you printing a single page now? What kind of content are you wanting to print text/drawing?

You'd need to enumerate the number of pages you need if you are going to offer a choice, or choices. As you build the PRINTDLG structure, set nMinPage, and nMaxPage, when you get it back from the PrintDlg() call you'll have to review the flags, and the nFromPage, nToPage entries, etc based on the options selected. Finally as you re-enumerate through your pages, you print the ones requested. How you achieve this depends a lot on your ability to render specific pages, and how you cache/store page specifics when you generated the original page count. For simple output of logs or diagrams that take only a few pages, you might not want to provide too many choices.

http://msdn.microsoft.com/en-us/library/ms646940%28VS.85%29.aspx
http://msdn.microsoft.com/en-us/library/ms646964%28v=VS.85%29.aspx

http://www.stromcode.com/2008/03/02/cwin32-printing/
It could be a random act of randomness. Those happen a lot as well.

Farabi

Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

jj2007