Click here to Skip to main content
15,917,538 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralBest collection class for CPoint object. Pin
kursatkaraca16-Apr-02 5:28
kursatkaraca16-Apr-02 5:28 
GeneralUNICODE Pin
Rage16-Apr-02 5:23
professionalRage16-Apr-02 5:23 
GeneralRe: UNICODE Pin
Philip Patrick16-Apr-02 6:35
professionalPhilip Patrick16-Apr-02 6:35 
GeneralRe: UNICODE Pin
Le centriste16-Apr-02 6:52
Le centriste16-Apr-02 6:52 
GeneralRe: UNICODE Pin
Le centriste16-Apr-02 18:25
Le centriste16-Apr-02 18:25 
GeneralStartPage() and Document/View Pin
dazinith16-Apr-02 5:19
dazinith16-Apr-02 5:19 
GeneralRe: StartPage() and Document/View Pin
Roger Allen16-Apr-02 6:34
Roger Allen16-Apr-02 6:34 
GeneralRe: StartPage() and Document/View Pin
Roger Allen16-Apr-02 6:40
Roger Allen16-Apr-02 6:40 
Different to my previous answer.

The MFC doc/view handles the printing using the following functions:


OnPreparePrinting()
OnBeginPrinting()
OnPrint() // by default this calls your views OnDraw()
OnEndPrinting()

In your OnPreparePrinting you need to setup the CPrintInfo structure with the number of pages you wish to print:

pInfo->SetMaxPage(5) ; // print 5 pages say


The MFC code will then call your OnPrint() function once per page. It will have done the calls to StartDoc() and StartPage/EndPage() for you. You will need to look in the pInfo->m_nPage member to see which page is being printed. From this info you can determine which data to print.

OnBeginPrinting and OnEndPrinting are only used if you need to configure the output DC etc for a special print operation.





Roger Allen
Sonork 100.10016

yet to be identified being from the planet Paltinmoriumbanfrettybooter
GeneralRe: StartPage() and Document/View Pin
Jonathan Craig16-Apr-02 7:28
Jonathan Craig16-Apr-02 7:28 
QuestionFile equivalent to ntprint.inf in Win98 ? Pin
Somu Lakshmanan16-Apr-02 5:18
Somu Lakshmanan16-Apr-02 5:18 
GeneralAccessing text controls of other dialog box Pin
16-Apr-02 4:58
suss16-Apr-02 4:58 
GeneralRe: Accessing text controls of other dialog box Pin
Chris Losinger16-Apr-02 5:05
professionalChris Losinger16-Apr-02 5:05 
GeneralRe: Accessing text controls of other dialog box Pin
18-Apr-02 4:56
suss18-Apr-02 4:56 
GeneralRe: Accessing text controls of other dialog box Pin
dazinith16-Apr-02 5:34
dazinith16-Apr-02 5:34 
GeneralRe: Accessing text controls of other dialog box Pin
18-Apr-02 4:55
suss18-Apr-02 4:55 
QuestionHow can I easily access addresses in DirectPlay? Pin
Vinsent16-Apr-02 4:48
Vinsent16-Apr-02 4:48 
GeneralProblem with CWnd::PreSubclassWindow Pin
Joel Holdsworth16-Apr-02 3:45
Joel Holdsworth16-Apr-02 3:45 
GeneralRe: Problem with CWnd::PreSubclassWindow Pin
Joaquín M López Muñoz16-Apr-02 9:55
Joaquín M López Muñoz16-Apr-02 9:55 
GeneralRe: Problem with CWnd::PreSubclassWindow Pin
Joel Holdsworth18-Apr-02 7:48
Joel Holdsworth18-Apr-02 7:48 
GeneralRe: Problem with CWnd::PreSubclassWindow Pin
Joaquín M López Muñoz18-Apr-02 8:16
Joaquín M López Muñoz18-Apr-02 8:16 
GeneralRe: Problem with CWnd::PreSubclassWindow Pin
Joel Holdsworth19-Apr-02 10:53
Joel Holdsworth19-Apr-02 10:53 
QuestionHow to hide my programme thoroughly Pin
User 1605516-Apr-02 3:34
User 1605516-Apr-02 3:34 
AnswerRe: How to hide my programme thoroughly Pin
Maximilien16-Apr-02 9:54
Maximilien16-Apr-02 9:54 
GeneralRe: How to hide my programme thoroughly Pin
Alex Cramer16-Apr-02 21:14
Alex Cramer16-Apr-02 21:14 
GeneralCListCtrl Pin
Catherine16-Apr-02 3:29
Catherine16-Apr-02 3:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.