Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Printing

Posted on 1998-08-04
2
Medium Priority
?
198 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
  • 2
2 Comments
 
LVL 7

Accepted Solution

by:
psdavis earned 90 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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses
Course of the Month12 days, 7 hours left to enroll

972 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