11-28-2007, 22:47
|
victorsow
Joined on 07-24-2006
Posts 3
|
Re: How to print multi pages in one task using ClassLibrary(MSVC)?
|
 
 
|
|
|
Thank you very much, Adam! It works very well.
The correct code is:
//Begin a print job
LBitmapBase MyBitmap; LPrint MyPrint;
//start page_1 MyBitmap.Load(TEXT("C:\\Image_1.cmp")); MyPrint.SetBitmap(&MyBitmap); //print page_1 HDC hdcPrinter = MyPrint.Print(NULL, 0, 0, 0, 0, FALSE); EndPage(hdcPrinter);
//start page_2 StartPage(hdcPrinter); MyBitmap.Load(TEXT("C:\\Image_2.cmp")); MyPrint.SetBitmap(&MyBitmap); //print page_2 MyPrint.Print(hdcPrinter, 0, 0, 0, 0, FALSE); EndPage(hdcPrinter); //... //start page_n StartPage(hdcPrinter); MyBitmap.Load(TEXT("C:\\Image_n.cmp")); MyPrint.SetBitmap(&MyBitmap); //print page_n MyPrint.Print(hdcPrinter);
//end the print job
|
|
|
|
|
Report
|
|
|
|