Click here to Skip to main content
15,927,744 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: fatal error LNK1120: 1 unresolved externals question Pin
Mark Salsbery12-Aug-08 16:08
Mark Salsbery12-Aug-08 16:08 
GeneralRe: fatal error LNK1120: 1 unresolved externals question Pin
monsieur_jj12-Aug-08 16:12
monsieur_jj12-Aug-08 16:12 
GeneralRe: fatal error LNK1120: 1 unresolved externals question Pin
Mark Salsbery12-Aug-08 16:16
Mark Salsbery12-Aug-08 16:16 
GeneralRe: fatal error LNK1120: 1 unresolved externals question Pin
monsieur_jj12-Aug-08 16:19
monsieur_jj12-Aug-08 16:19 
GeneralRe: fatal error LNK1120: 1 unresolved externals question [modified] Pin
Mark Salsbery12-Aug-08 16:25
Mark Salsbery12-Aug-08 16:25 
GeneralRe: fatal error LNK1120: 1 unresolved externals question Pin
monsieur_jj12-Aug-08 16:42
monsieur_jj12-Aug-08 16:42 
QuestionTypelib issue Pin
George_George12-Aug-08 15:40
George_George12-Aug-08 15:40 
QuestionWriting in a CScrollView and print Previews - I can move forward in the print preview, but not backwards Pin
Sternocera12-Aug-08 11:54
Sternocera12-Aug-08 11:54 
Hello,

I'm creating a CScrollView , onto which I draw things by overloading OnDraw(). In the View's OnPrint, I call OnDraw with the printing device context as an argument.
BOOL CMyScrollView::OnPreparePrinting(CPrintInfo* pInfo)
{
	pInfo->SetMinPage(1);
	
	pInfo->SetMaxPage(num_pages); // num_pages is not zero based
	return CScrollView::DoPreparePrinting(pInfo);
}

void CMyScrollView::OnPrint(CDC *pDC, CPrintInfo *pInfo)
{
	
	CurPage = (pInfo->m_nCurPage - 1); // compensate for m_nCurPage's NOT being zero based

	OnDraw(pDC); // OnDraw isn't anything fancy - it is reliant on the class member
                     // CurPage, an int, to track the current page number

	CScrollView::OnPrint(pDC,pInfo);
}


This has worked for me elsewhere, but, for reasons I have not yet successfully isolated, it does not work here as I'd like it to. I can view print previews, and can go forward to the next page, but not back to the previous, and I can zoom in but cannot zoom out. I have attempting to debug the problem with little success. Any insights that might help me to solve this problem would be greatly appreciated,

Regards,
Sternocera
Questionclass align vs struct align Pin
oobimoo12-Aug-08 11:04
oobimoo12-Aug-08 11:04 
AnswerRe: class align vs struct align Pin
Bram van Kampen12-Aug-08 11:12
Bram van Kampen12-Aug-08 11:12 
GeneralRe: class align vs struct align Pin
oobimoo12-Aug-08 11:24
oobimoo12-Aug-08 11:24 
GeneralRe: class align vs struct align Pin
Bram van Kampen12-Aug-08 12:13
Bram van Kampen12-Aug-08 12:13 
GeneralRe: class align vs struct align Pin
oobimoo12-Aug-08 12:20
oobimoo12-Aug-08 12:20 
AnswerRe: class align vs struct align Pin
Jijo.Raj12-Aug-08 19:22
Jijo.Raj12-Aug-08 19:22 
GeneralRe: class align vs struct align Pin
oobimoo12-Aug-08 23:18
oobimoo12-Aug-08 23:18 
GeneralRe: class align vs struct align Pin
Bram van Kampen13-Aug-08 16:32
Bram van Kampen13-Aug-08 16:32 
QuestionInitializing and Terminating function calls with a static library Pin
Chris Meech12-Aug-08 10:18
Chris Meech12-Aug-08 10:18 
AnswerRe: Initializing and Terminating function calls with a static library Pin
Mark Salsbery12-Aug-08 10:45
Mark Salsbery12-Aug-08 10:45 
GeneralRe: Initializing and Terminating function calls with a static library Pin
Chris Meech12-Aug-08 15:02
Chris Meech12-Aug-08 15:02 
GeneralRe: Initializing and Terminating function calls with a static library Pin
Mark Salsbery12-Aug-08 15:22
Mark Salsbery12-Aug-08 15:22 
GeneralRe: Initializing and Terminating function calls with a static library Pin
Bram van Kampen12-Aug-08 15:40
Bram van Kampen12-Aug-08 15:40 
GeneralRe: Initializing and Terminating function calls with a static library Pin
Chris Meech13-Aug-08 4:29
Chris Meech13-Aug-08 4:29 
GeneralRe: Initializing and Terminating function calls with a static library Pin
Mark Salsbery13-Aug-08 6:01
Mark Salsbery13-Aug-08 6:01 
GeneralRe: Initializing and Terminating function calls with a static library Pin
Bram van Kampen12-Aug-08 15:27
Bram van Kampen12-Aug-08 15:27 
GeneralRe: Initializing and Terminating function calls with a static library Pin
Mark Salsbery12-Aug-08 15:33
Mark Salsbery12-Aug-08 15:33 

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.