Print Problem
-
I want to Print An Image Buffer(640*480) in MFC dialog application. I can print but, size of Printed Image is not (640*480). How can I solve the problem? Probably in mapping Problem. I used : void PMCToolDlg::OnPrepareDC(CDC* pDC, CPrintInfo* pInfo) { if (pDC->IsPrinting()) { pDC->SetMapMode(MM_ISOTROPIC); pDC->SetViewportExt(7, 7); pDC->SetWindowExt(1, 1); pDC->SetViewportOrg(0,0); } } Thannks in Adance, Mazhar
-
I want to Print An Image Buffer(640*480) in MFC dialog application. I can print but, size of Printed Image is not (640*480). How can I solve the problem? Probably in mapping Problem. I used : void PMCToolDlg::OnPrepareDC(CDC* pDC, CPrintInfo* pInfo) { if (pDC->IsPrinting()) { pDC->SetMapMode(MM_ISOTROPIC); pDC->SetViewportExt(7, 7); pDC->SetWindowExt(1, 1); pDC->SetViewportOrg(0,0); } } Thannks in Adance, Mazhar
And where are you creating the compatible bitmap to the equivalent size of your dimensions in that mappin mode?
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? Help me to understand what I'm saying, and I'll explain it better to you ;)
-
I want to Print An Image Buffer(640*480) in MFC dialog application. I can print but, size of Printed Image is not (640*480). How can I solve the problem? Probably in mapping Problem. I used : void PMCToolDlg::OnPrepareDC(CDC* pDC, CPrintInfo* pInfo) { if (pDC->IsPrinting()) { pDC->SetMapMode(MM_ISOTROPIC); pDC->SetViewportExt(7, 7); pDC->SetWindowExt(1, 1); pDC->SetViewportOrg(0,0); } } Thannks in Adance, Mazhar
I see one problem immediately... From the docs: "When MM_ISOTROPIC mode is set, an application must call the SetWindowExtEx function before calling SetViewportExtEx"
mazhar_cse wrote:
size of Printed Image is not (640*480).
Assuming you get the DC set up properly, and you're not stretching the image when you render it to the print DC, the resulting image dimensions should be 4480 x 3360. As far as the size on the printed page - this could be anything. You haven't taken resolution into consideration here. Mark
Mark Salsbery Microsoft MVP - Visual C++ :java: