Solved

Printing

Posted on 1998-08-04
2
187 Views
Last Modified: 2013-11-19
Since there is a lot of drawing that has been done in the OnDraw in pixels .I am mapping the printer pixels to scale the figure in the Ondraw. It draws the lines and fonts but for some reason it ignores the bitmap how to sclale the bitmaps on the screen ????
0
Comment
Question by:sram
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 7

Accepted Solution

by:
psdavis earned 30 total points
ID: 1320268
This is basically how I do it.  You may want to try a version of this...

CYourView::PrintThisPage( )
{
.

   CDC*     pTempDC     = new CDC;
   CBitmap* pForteLogo  = new CBitmap;
   
   pForteLogo->LoadBitmap( IDB_FORTE_IMAGE );
   pTempDC   ->CreateCompatibleDC( pDC );
   
   CBitmap* pOldBitmap  = pTempDC->SelectObject( pForteLogo );
   pDC->StretchBlt( 9000, -8000, 1775, -1775, pTempDC, 0, 0, 355, 355, SRCCOPY );
   
   pTempDC->SelectObject( pOldBitmap );
   pOldBitmap->DeleteObject( );
   
   delete pForteLogo;
   delete pTempDC;
.
}

Phillip
0
 
LVL 7

Expert Comment

by:psdavis
ID: 1320269
To help you out a bit, I kind of need to tell you how I computed some of these numbers.  I'm using pDC->SetMapMode( MM_TWIPS ) for my scaling.  The numbers that you see, 9000, 1775 are positions on the paper (I use floats) that are multiplied by 1440.  The negative positions: -8000, -1775 are because Y is inverted.  You have to display Y in negatives to print on the screen.

Phillip
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
mixString challenge 36 137
zeroMAx challenge 20 135
EvenOdd challenge 10 160
Thin secure Windows 10 5 116
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question