Click here to Skip to main content
15,920,217 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: dynamic two dimentional array Pin
Waldermort12-Sep-07 4:09
Waldermort12-Sep-07 4:09 
AnswerRe: dynamic two dimentional array Pin
Mark Salsbery12-Sep-07 6:53
Mark Salsbery12-Sep-07 6:53 
GeneralRe: dynamic two dimentional array Pin
carrivick12-Sep-07 8:37
carrivick12-Sep-07 8:37 
GeneralRe: dynamic two dimentional array Pin
David Crow12-Sep-07 8:41
David Crow12-Sep-07 8:41 
GeneralRe: dynamic two dimentional array Pin
Mark Salsbery12-Sep-07 8:42
Mark Salsbery12-Sep-07 8:42 
QuestionHow to change size of a win32 toolbar after TB_DELETEBUTTON Pin
ioctl5112-Sep-07 0:13
ioctl5112-Sep-07 0:13 
QuestionPrinting Problem Pin
pri_skit11-Sep-07 23:59
pri_skit11-Sep-07 23:59 
AnswerRe: Printing Problem Pin
Nelek12-Sep-07 0:29
protectorNelek12-Sep-07 0:29 
You will need to use NON DEVICE DEPENDANT UNITS. I had some problems like that printing with the same mark but different models.

I coded it in that way:

void CMyView::OnPrint(CDC* pDC, CPrintInfo* pInfo) 
{	
	CMyDoc* pDoc = GetDocument ();
	ASSERT_VALID (pDoc);
	// Setting printing parameters
	pDC->SetMapMode (MM_LOMETRIC);
	
	double dLeftOffset=200-(pDC->GetDeviceCaps(PHYSICALOFFSETX)*254.0)/pDC->GetDeviceCaps(LOGPIXELSX);
	double dTopOffset=200-(pDC->GetDeviceCaps (PHYSICALOFFSETY)*254.0)/pDC->GetDeviceCaps (LOGPIXELSY);
	double dRightMargin=1950-(pDC->GetDeviceCaps (PHYSICALOFFSETX)*254.0)/pDC->GetDeviceCaps(LOGPIXELSX);
	double dBottomMargin=2770-(pDC->GetDeviceCaps (PHYSICALOFFSETY)*254.0)/pDC->GetDeviceCaps(LOGPIXELSY);

	pInfo->m_rectDraw.left += (int) dLeftOffset;
	pInfo->m_rectDraw.top += (int) dTopOffset;
	pInfo->m_rectDraw.right = (int) dRightMargin;
	pInfo->m_rectDraw.bottom = (int) dBottomMargin;

//...


then to print images... I used the ::StretchDIBits (...) function, and to print text the pDC->TextOut (...) function. But using coordinates like

pInfo->m_rectDraw.left + XXX;
pInfo->m_rectDraw.top - XXX;

and so on.

Hope it helps

Greetings.

--------
M.D.V.

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?

GeneralRe: Printing Problem Pin
pri_skit12-Sep-07 1:31
pri_skit12-Sep-07 1:31 
GeneralRe: Printing Problem Pin
Nelek12-Sep-07 1:42
protectorNelek12-Sep-07 1:42 
AnswerRe: Printing Problem [modified] Pin
bob1697212-Sep-07 1:54
bob1697212-Sep-07 1:54 
Generalproblem in url Pin
yadahav11-Sep-07 23:30
yadahav11-Sep-07 23:30 
GeneralRe: problem in url Pin
nitin311-Sep-07 23:38
nitin311-Sep-07 23:38 
GeneralRe: problem in url Pin
David Crow12-Sep-07 3:13
David Crow12-Sep-07 3:13 
QuestionRe: problem in url Pin
Hamid_RT12-Sep-07 6:58
Hamid_RT12-Sep-07 6:58 
QuestionProblem when adding JPEG images in ListBox Pin
Atul2311-Sep-07 23:29
Atul2311-Sep-07 23:29 
QuestionRe: Problem when adding JPEG images in ListBox Pin
David Crow12-Sep-07 3:15
David Crow12-Sep-07 3:15 
QuestionHow to make Unistall.exe Pin
GauranG Shah11-Sep-07 23:21
GauranG Shah11-Sep-07 23:21 
AnswerRe: How to make Unistall.exe Pin
Russell'12-Sep-07 0:06
Russell'12-Sep-07 0:06 
GeneralRe: How to make Unistall.exe [modified] Pin
GauranG Shah12-Sep-07 0:12
GauranG Shah12-Sep-07 0:12 
GeneralRe: How to make Unistall.exe Pin
Russell'12-Sep-07 2:06
Russell'12-Sep-07 2:06 
GeneralRe: How to make Unistall.exe Pin
GauranG Shah12-Sep-07 3:00
GauranG Shah12-Sep-07 3:00 
QuestionIs the OS Vista? Pin
Russell'12-Sep-07 3:25
Russell'12-Sep-07 3:25 
AnswerRe: Is the OS Vista? Pin
GauranG Shah12-Sep-07 4:14
GauranG Shah12-Sep-07 4:14 
Questionhow to find the list of activex controls Pin
chandu00411-Sep-07 23:13
chandu00411-Sep-07 23:13 

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.