Link to home
Start Free TrialLog in
Avatar of huya
huya

asked on

Major points for simple printing question in 95

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!!
Avatar of galkin
galkin

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.
Avatar of huya

ASKER

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.
Did U try using EndPage of the printer DC???
Avatar of huya

ASKER

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

Any ideas??
ASKER CERTIFIED SOLUTION
Avatar of lucidity
lucidity

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
did that work out for you?

I'm still around if you have any more questions