Solved

Printing

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MFC Dialog 9 48
How to create frequencies of a variable from SAS dataset? 10 121
How to determine file rename from EventLog ? 2 42
move a line in eclipse 3 81
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

910 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now