Solved

Printing

Posted on 1998-08-04
2
177 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 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to monitor remote shell execution on linux 9 100
countEvens challenge 2 100
wordmultiple challenge 12 132
Way to decrease size of apk file 9 67
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…
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.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

770 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