Printing multiple pages

  • Thread starter Thread starter Marcelo
  • Start date Start date
M

Marcelo

Greetings.
I develop a multiple forms applications with Microsoft Visual Studio
C++ .NET 2003 and I'd like to know how can I print more than one page
in my application. For printing one page, I do:

private: System::Void button1_Click(System::Object * sender,
System::EventArgs * e){
if(printDialog1->ShowDialog() == DialogResult::OK){
printDocument1->PrintPage += new PrintPageEventHandler(this,
&Form1::printDocument1_PrintPage);
printDocument1->Print();
}
}

private: System::Void printDocument1_PrintPage(Object* sender,
PrintPageEventArgs* ev){
ev->Graphics->Draw...//I make the drawings to print
ev->HasMorePages = false
}
It works perfectly. But I want to print two graphics pages, one after
another. Any help will be very appreciated.
 
In the MSDN they tell me to use the SetMaxPage method in an override
CView::OnPreparePrinting function to print
more than one page. How could I do this? And must both pages be drawn
in the printDocument1_PrintPage event?
 
Back
Top