Click here to Skip to main content
15,913,836 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Beginner would like to know where to start Pin
Christian Graus10-May-04 16:55
protectorChristian Graus10-May-04 16:55 
GeneralRe: Beginner would like to know where to start Pin
parths10-May-04 19:09
parths10-May-04 19:09 
GeneralDynamic Dialog Subclassed Controls Pin
User 1278210-May-04 14:52
User 1278210-May-04 14:52 
GeneralRe: Dynamic Dialog Subclassed Controls Pin
nguyenvhn10-May-04 16:00
nguyenvhn10-May-04 16:00 
GeneralRe: Dynamic Dialog Subclassed Controls Pin
User 1278210-May-04 16:29
User 1278210-May-04 16:29 
Questionhow to control the other exe's ocx control? Pin
wl@syntc.com.cn10-May-04 14:26
wl@syntc.com.cn10-May-04 14:26 
GeneralPrint Reverse Pin
tkelly14010-May-04 13:40
tkelly14010-May-04 13:40 
GeneralRe: Print Reverse Pin
vividtang11-May-04 0:41
vividtang11-May-04 0:41 
hey:
to realize reverse print ,then that print program must support "what you get is what you see",that is to say:the same function not only finish display but also print.because only this way,the Document in screen can be corresponding to the printing length.and at the same time we can set the maxpage in OnParePrinting.
now i give a little example ,hope to give you some instructive things.
for example:(1)now there is a student database
(2)by Appwizard,the sixth step set PrintView (base class :scrollView)
(3)extracted data from the database then display them in scrollview
(3)below about your reverse print
1.Bool CPrintView::OnPreparePrinting(CPrintInfo*pInfo)
{pInfo->SetMaxPage(StudRecNum/5);
//StudRecNum is student recordnumber,iwant set 5 records in a page
return DoPreparePrinting(pInfo);}
2,in OnBeginPrinting
{m_bPrintEnd=false;
//m_bPrintEnd is declared in CPrintView to point whether stop printing
studentRec->MoveLast();
if(studentRec->IsBOF())
m_bPrintEnd=true;
}
3.void CPrintView::OnPrepareDC(CDC*pDC,CPrintInfo*pInfo)
{
CSrollView::OnPrepareDC(pDC,pInfo);
if(pInfo!=NULL)
pInfo->m_bContinuePrinting!=m_bPrintEnd;
}
4.void CPrintView::OnPrint(CDC*pDC,CPrintInfo*pInfo)
{
int Curpage=pInfo->m_nCurPage;
studentRec->SetAbsolutePosition(StudRecNum);
......
//set output map mode,and get the auguments of text metrics
//print the column headers
//print student records in one page by loop
//set for next printing
....
studentRec->MovePrev();
if(studentRec->IsBOF()
{m_bPrintEnd=true;
break;
}
CSrollView::OnPrint(pDC,pInfo);
}
i only give a thinking ,not write completely,try to finish ,then post your harves to make us all progress.Rose | [Rose]
QuestionHow to call VB.NET DLL from VC++.NET Pin
Member 87328310-May-04 12:55
Member 87328310-May-04 12:55 
Generalworking with streams Pin
ra_sasi10-May-04 12:44
ra_sasi10-May-04 12:44 
GeneralRe: working with streams Pin
Paul Ranson10-May-04 13:01
Paul Ranson10-May-04 13:01 
GeneralRe: working with streams Pin
ra_sasi11-May-04 6:40
ra_sasi11-May-04 6:40 
GeneralNOT a Site Search? Search text within tables and display results. Pin
thefreebay10-May-04 12:41
thefreebay10-May-04 12:41 
GeneralRe: NOT a Site Search? Search text within tables and display results. Pin
Anthony_Yio10-May-04 16:17
Anthony_Yio10-May-04 16:17 
Questionprint screen hook? Pin
Miguel Lopes10-May-04 11:38
Miguel Lopes10-May-04 11:38 
AnswerRe: print screen hook? Pin
Toby Opferman10-May-04 16:29
Toby Opferman10-May-04 16:29 
GeneralRe: print screen hook? Pin
Toby Opferman10-May-04 18:26
Toby Opferman10-May-04 18:26 
GeneralRe: print screen hook? Pin
Miguel Lopes10-May-04 23:42
Miguel Lopes10-May-04 23:42 
GeneralRe: print screen hook? Pin
Toby Opferman11-May-04 2:42
Toby Opferman11-May-04 2:42 
GeneralRe: print screen hook? Pin
Miguel Lopes11-May-04 3:05
Miguel Lopes11-May-04 3:05 
GeneralRe: print screen hook? Pin
Toby Opferman11-May-04 6:00
Toby Opferman11-May-04 6:00 
GeneralRe: print screen hook? Pin
Miguel Lopes12-May-04 2:58
Miguel Lopes12-May-04 2:58 
GeneralC2065 Compiler error. Pin
bin892210-May-04 11:30
bin892210-May-04 11:30 
GeneralRe: C2065 Compiler error. Pin
Christian Graus10-May-04 12:09
protectorChristian Graus10-May-04 12:09 
GeneralRe: C2065 Compiler error. Pin
bin892210-May-04 12:27
bin892210-May-04 12:27 

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.