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

C / C++ / MFC

 
GeneralNot Running when adding RIch Edit Box to a Dialog Pin
pubududilena9-Sep-04 0:44
pubududilena9-Sep-04 0:44 
GeneralRe: Not Running when adding RIch Edit Box to a Dialog Pin
Arsalan Malik9-Sep-04 0:48
Arsalan Malik9-Sep-04 0:48 
GeneralRe: Not Running when adding RIch Edit Box to a Dialog Pin
David Crow9-Sep-04 2:19
David Crow9-Sep-04 2:19 
GeneralCreate Thumbnail of MS WORD file Pin
Sumit Kapoor9-Sep-04 0:07
Sumit Kapoor9-Sep-04 0:07 
GeneralDebugging with Visual Studio .NET Pin
Jerome Conus8-Sep-04 23:32
Jerome Conus8-Sep-04 23:32 
GeneralRe: Debugging with Visual Studio .NET Pin
Michael Dunn9-Sep-04 7:10
sitebuilderMichael Dunn9-Sep-04 7:10 
QuestionHow to create a autofill utility Pin
akszn8-Sep-04 23:02
akszn8-Sep-04 23:02 
GeneralGetting Page Size and then Printing Text. Pin
Eversman8-Sep-04 21:52
Eversman8-Sep-04 21:52 
Hey all,

I am trying to get the page size of the page and then printing certain words on the page.

This is what I have so far.

<br />
<br />
//// Create a printer DC    <br />
	CPrintDialog dlg(FALSE);     <br />
	CDC dc; <br />
	#if 0 //Show print dialog.    <br />
	if (dlg.DoModal() == IDCANCEL)       <br />
		return;   <br />
	dc.Attach(dlg.GetPrinterDC());<br />
	#else //Don't show print dialog.    <br />
	PRINTDLG prtDlg;    <br />
	AfxGetApp()->GetPrinterDeviceDefaults(&prtDlg); //Should check for error.    <br />
	dlg.m_pd.hDevMode = prtDlg.hDevMode;    <br />
	dlg.m_pd.hDevNames = prtDlg.hDevNames;    <br />
	dc.Attach(dlg.CreatePrinterDC());<br />
	#endif   <br />
	dc.m_bPrinting = TRUE; //// Now use the DC.    <br />
	//Get the page size.    <br />
<br />
	dc.GetDeviceCaps(LOGPIXELSX/LOGPIXELSY); <br />
<br />
	CRect printArea;<br />
        printArea.SetRect(LOGPIXELSX/3, LOGPIXELSY/3, dc.GetDeviceCaps(HORZRES), dc.GetDeviceCaps(VERTRES));<br />
<br />
CString str("Delayed Entry");<br />
dc.DrawText(str, printArea, DT_NOPREFIX | DT_WORDBREAK);<br />
<br />
<br />


It is printing, but not where I need it to print. Am I doing it wrong or is there something I am missing?

Thanks
GeneralApplication Installation once only. Pin
Mythri.B.L8-Sep-04 21:18
Mythri.B.L8-Sep-04 21:18 
GeneralRe: Application Installation once only. Pin
David Crow9-Sep-04 2:31
David Crow9-Sep-04 2:31 
GeneralRe: Application Installation once only. Pin
Anonymous9-Sep-04 19:26
Anonymous9-Sep-04 19:26 
QuestionHow to Use Object of MFC class in ATL DLL Pin
zahid_ash8-Sep-04 21:00
zahid_ash8-Sep-04 21:00 
GeneralHide Static Text Pin
Rajesh_K_Sharma8-Sep-04 20:15
Rajesh_K_Sharma8-Sep-04 20:15 
GeneralRe: Hide Static Text Pin
LOUIS Christian8-Sep-04 21:30
LOUIS Christian8-Sep-04 21:30 
GeneralRe: Hide Static Text Pin
David Crow9-Sep-04 2:36
David Crow9-Sep-04 2:36 
Generalhelp!!help,how to use IVMRWindowlessControl9. Pin
yingkou8-Sep-04 19:18
yingkou8-Sep-04 19:18 
QuestionFail to register OLE Drop Target!!!??? Pin
Pear Redsome8-Sep-04 18:25
Pear Redsome8-Sep-04 18:25 
GeneralLayering Bitblt Pin
bmw50028-Sep-04 17:18
bmw50028-Sep-04 17:18 
GeneralRe: Layering Bitblt Pin
Ryan Binns8-Sep-04 18:20
Ryan Binns8-Sep-04 18:20 
GeneralRe: Layering Bitblt Pin
Larry Antram8-Sep-04 19:40
Larry Antram8-Sep-04 19:40 
GeneralGood tool for developer! Pin
tianzj8-Sep-04 16:54
tianzj8-Sep-04 16:54 
GeneralRe: Good tool for developer! Pin
David Crow9-Sep-04 2:43
David Crow9-Sep-04 2:43 
GeneralPlease help to solve me a problem with multiline texrbox and checkbox Pin
anuchelvi8-Sep-04 16:26
anuchelvi8-Sep-04 16:26 
GeneralRe: Please help to solve me a problem with multiline texrbox and checkbox Pin
David Crow9-Sep-04 3:00
David Crow9-Sep-04 3:00 
GeneralConvert LPSTR to LPCSTR Pin
bmw50028-Sep-04 15:41
bmw50028-Sep-04 15:41 

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.