Printing with GUI+
-
I want to print bitmap on full page, so i wright: [code] void CtestView::OnPrint(CDC* pDC, CPrintInfo* pInfo) { int cxPage = pDC->GetDeviceCaps(HORZRES); int cyPage = pDC->GetDeviceCaps(VERTRES); Graphics g(pDC->m_hDC); g.DrawImage(m_pBitmap, 0, 0, cxPage , cyPage ); } [/code] Thats ok in preview but not in printer. What transformations i need to do?
-
I want to print bitmap on full page, so i wright: [code] void CtestView::OnPrint(CDC* pDC, CPrintInfo* pInfo) { int cxPage = pDC->GetDeviceCaps(HORZRES); int cyPage = pDC->GetDeviceCaps(VERTRES); Graphics g(pDC->m_hDC); g.DrawImage(m_pBitmap, 0, 0, cxPage , cyPage ); } [/code] Thats ok in preview but not in printer. What transformations i need to do?
This is due to a printer DC and a screen DC having different levels of support. Take a look at my "Printing tips and tricks from the trenches" article in the printing section. It has a method to solve this problem. Roger Allen - Sonork 100.10016 Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...
-
This is due to a printer DC and a screen DC having different levels of support. Take a look at my "Printing tips and tricks from the trenches" article in the printing section. It has a method to solve this problem. Roger Allen - Sonork 100.10016 Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...
-
I read that article, but it dont contain answer: What and how i need to transform to see preview and printing page in the same style, using GUI+ ...
You need to make use of the procedure that changes a DDB to a DIB and use StretchDIBBits() to plot it. This command is much better supported by printer DC's. BitBlt usually fails miserably. Roger Allen - Sonork 100.10016 Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...
-
You need to make use of the procedure that changes a DDB to a DIB and use StretchDIBBits() to plot it. This command is much better supported by printer DC's. BitBlt usually fails miserably. Roger Allen - Sonork 100.10016 Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...
-
I want to print bitmap on full page, so i wright: [code] void CtestView::OnPrint(CDC* pDC, CPrintInfo* pInfo) { int cxPage = pDC->GetDeviceCaps(HORZRES); int cyPage = pDC->GetDeviceCaps(VERTRES); Graphics g(pDC->m_hDC); g.DrawImage(m_pBitmap, 0, 0, cxPage , cyPage ); } [/code] Thats ok in preview but not in printer. What transformations i need to do?
Here is answer if somebody whant in: void CtestView::OnPrint(CDC* pDC, CPrintInfo* pInfo) { int cxPage = pDC->GetDeviceCaps(HORZRES); int cyPage = pDC->GetDeviceCaps(VERTRES); Graphics g(pDC->m_hDC); g.SetPageUnit(UnitInch); g.DrawImage(m_pBitmap, 0, 0, cxPage/g.GetDpiX() , cyPage/g.GetDpiX() ); }