Click here to Skip to main content
15,921,113 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to generate GUID. Pin
David Crow23-Aug-07 4:27
David Crow23-Aug-07 4:27 
GeneralRe: How to generate GUID. Pin
jhwurmbach23-Aug-07 4:47
jhwurmbach23-Aug-07 4:47 
AnswerRe: How to generate GUID. Pin
jhwurmbach23-Aug-07 2:53
jhwurmbach23-Aug-07 2:53 
QuestionRe: How to generate GUID. Pin
veer_in23-Aug-07 3:04
veer_in23-Aug-07 3:04 
AnswerRe: How to generate GUID. Pin
jhwurmbach23-Aug-07 3:08
jhwurmbach23-Aug-07 3:08 
AnswerRe: How to generate GUID. Pin
Waldermort23-Aug-07 8:36
Waldermort23-Aug-07 8:36 
AnswerRe: How to generate GUID. Pin
Michael Dunn23-Aug-07 10:43
sitebuilderMichael Dunn23-Aug-07 10:43 
QuestionPrinting Pin
Sangeetha_J23-Aug-07 2:24
Sangeetha_J23-Aug-07 2:24 
Hi,

I want to display a report containing four columns and to provide printing option for that. My code is:
<br />
<br />
void CColorView::OnDraw(CDC* pDC)<br />
{<br />
<br />
	CDocumentationDoc* pDoc = GetDocument();<br />
	<br />
	if(pDC -> IsPrinting())<br />
	{<br />
<br />
		pDC -> SetMapMode(MM_ISOTROPIC);<br />
		<br />
		pDC->SetMapMode(MM_ISOTROPIC);<br />
		pDC->SetWindowExt(500, 500);<br />
		pDC->SetViewportExt(4500, 6500);<br />
<br />
	}<br />
<br />
	pDC -> TextOut(30, 10, "COLOR");<br />
	pDC -> TextOut(280, 10, "DEV-TYPE");<br />
	pDC -> TextOut(600, 10, "VALUE");<br />
	pDC -> TextOut(730, 10, "QUANTITY");<br />
<br />
	int xinc = 40, yinc = 20, ytemp = 50;<br />
<br />
	int size = FootPrintArray.GetSize();<br />
<br />
	for(int i = 0; i < size; i++)<br />
	{<br />
<br />
		footprint = (FootPrint*) FootPrintArray.GetAt(i);<br />
<br />
		BYTE red, green, blue;<br />
		<br />
		red = ((BYTE*)(&footprint -> color))[0];<br />
		green = ((BYTE*)(&footprint -> color))[1];<br />
		blue = ((BYTE*)(&footprint -> color))[2];<br />
<br />
		CPen penShadow(PS_SOLID, 1, PALETTERGB(red,green,blue));<br />
		CPen* ppenOld = pDC -> SelectObject(&penShadow);<br />
<br />
		CBrush brCenter;<br />
		brCenter.CreateSolidBrush(PALETTERGB(red,green,blue));<br />
		CBrush* pbrOld = pDC -> SelectObject(&brCenter);<br />
<br />
		int yval = ytemp + (i * yinc);		<br />
<br />
		pDC -> Rectangle(30, yval - 10, 70, yval);<br />
		pDC -> TextOut(100, (yval - 10), footprint -> FtPtName);<br />
		pDC -> TextOut(600, (yval - 10), footprint -> Value);<br />
		pDC -> TextOut(770, (yval - 10), footprint -> Quantity);<br />
<br />
	}	<br />
<br />
	// TODO: add draw code here<br />
<br />
}<br />

It is getting printed now.. i can able to take pdf from my view. But in this the row values of the columns 2 and 3 may vary to any large value at run time. How to calculate and print? Suggest me some ideas.

With Regards,
Sangeetha.

AnswerRe: Printing Pin
Hadi Dayvary23-Aug-07 2:35
professionalHadi Dayvary23-Aug-07 2:35 
GeneralRe: Printing Pin
Sangeetha_J23-Aug-07 2:39
Sangeetha_J23-Aug-07 2:39 
QuestionFont of controls in property pages Pin
Hadi Dayvary23-Aug-07 1:59
professionalHadi Dayvary23-Aug-07 1:59 
AnswerRe: Font of controls in property pages Pin
toxcct23-Aug-07 2:22
toxcct23-Aug-07 2:22 
GeneralRe: Font of controls in property pages Pin
Hadi Dayvary23-Aug-07 2:32
professionalHadi Dayvary23-Aug-07 2:32 
GeneralRe: Font of controls in property pages Pin
jhwurmbach23-Aug-07 2:46
jhwurmbach23-Aug-07 2:46 
GeneralRe: Font of controls in property pages Pin
toxcct23-Aug-07 3:26
toxcct23-Aug-07 3:26 
GeneralRe: Font of controls in property pages Pin
jhwurmbach23-Aug-07 3:29
jhwurmbach23-Aug-07 3:29 
Questionregistry cleaner for window xp Pin
niki dutta23-Aug-07 1:48
niki dutta23-Aug-07 1:48 
AnswerRe: registry cleaner for window xp Pin
Russell'23-Aug-07 1:51
Russell'23-Aug-07 1:51 
QuestionRe: registry cleaner for window xp Pin
David Crow23-Aug-07 2:48
David Crow23-Aug-07 2:48 
QuestionSocket send problem Pin
BakaBug23-Aug-07 1:31
BakaBug23-Aug-07 1:31 
AnswerRe: Socket send problem Pin
Mark Salsbery23-Aug-07 5:59
Mark Salsbery23-Aug-07 5:59 
GeneralRe: Socket send problem Pin
BakaBug23-Aug-07 10:08
BakaBug23-Aug-07 10:08 
GeneralRe: Socket send problem Pin
Mark Salsbery23-Aug-07 11:10
Mark Salsbery23-Aug-07 11:10 
GeneralRe: Socket send problem Pin
BakaBug24-Aug-07 0:19
BakaBug24-Aug-07 0:19 
GeneralRe: Socket send problem Pin
Mark Salsbery24-Aug-07 5:24
Mark Salsbery24-Aug-07 5:24 

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.