We help IT Professionals succeed at work.

Major points for simple printing question in 95

huya
huya asked
on
193 Views
Last Modified: 2013-11-20
I'm writing an app and doing the printing manually by adding code to OnPrint function.

My problem is that according to the help, each time OnPrint is called, it allows printing a specific page number.... i.e. first call, all printing goes to page 1, second call, all printing goes to page 2.

My question is :
In the middle of printing to the device context of OnPrint (ie. pDC), is there a way to change the page number that the printing is going to without exiting the OnPrint function and waiting for the next call?

Need answer ASAP!!
Comment
Watch Question

Commented:
OnPrint function is passed pointer to CPrintInfo structure as second parameter. This structure has field m_nCurPage that is current page. I guess you can change this field at any stage.

Author

Commented:
I've tried that.  What happens is that what ever was printed on page n gets erase and the new data being printed goes onto page 2.

Commented:
Did U try using EndPage of the printer DC???

Author

Commented:
I just tried it.... did not work.  Again, it refreshes the age, but I lose the page I was printing on.

Any ideas??
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Commented:
did that work out for you?

I'm still around if you have any more questions
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.