Click here to Skip to main content
15,913,115 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Multithreading & Doc_View Pin
Paul Selormey10-Apr-00 0:31
Paul Selormey10-Apr-00 0:31 
Generalurgent:need help with TRANSPARENT toolbar Pin
tomer dror21-Mar-00 5:19
tomer dror21-Mar-00 5:19 
QuestionHow to load a bitmap from disk? Pin
Newbie20-Mar-00 21:28
Newbie20-Mar-00 21:28 
AnswerRE: How to load a bitmap from disk? Pin
Derek22-Mar-00 14:02
Derek22-Mar-00 14:02 
GeneralView handling or hiding. Pin
i_am_aamir20-Mar-00 10:19
i_am_aamir20-Mar-00 10:19 
GeneralRe: View handling or hiding. Pin
Paul Selormey10-Apr-00 1:29
Paul Selormey10-Apr-00 1:29 
Generalprinting a graphic Pin
Anonymous20-Mar-00 3:43
suss Anonymous20-Mar-00 3:43 
GeneralRE: printing a graphic Pin
Derek20-Mar-00 15:50
Derek20-Mar-00 15:50 
get the picture into a DC..
then use some code like this...

CPrintDialog printdlg(false, NULL); // instantiate the printer dialog
if (printdlg.DoModal() != IDOK) // show the printer setup dialog
return;
CDC srcDC; // this needs to be the image
HDC hDC = printdlg.GetPrinterDC(); // get a DC to the printer
CDC pDC;
pDC.Attach(hDC); // attach the printer dc to a CDC
pDC.StartDoc("printing"); // start the document
pDC.StartPage("page 1"); // start the current page
int width = 500 // image width
int height // image height
// this next function will stretch the image to full size (as it is displayed)...
pDC.StretchBlt(0, 0, width * 3, height * 3, &srcDC, 0, 0, width, height, SRCCOPY);
pDC.EndPage();
pDC.EndDoc();

==================
The original message was:


This may have been covered in a previous post, but I don't know because there are just too many previous posts to wade through.

I am trying to print a bitmap graphic that is generated from data. It is in a view, so currently I am just printing the view using the whole doc/view printing made easy functions. Actually, I didn't even have to do any programming at all because somehow it was all set up pretty well already just by the MFC standards. Only I have two imposing problems:
1) My bitmap's y axis is reversed or something, because it isn't just printed upside-down, it is printed with the entire y-axis completely reversed, but the x-axis normal. So my graphic is innacurate.
2) My bitmap is being printed really tiny, which makes it hard to see. Because it is generated from data, it needs to be able to be seen clearly.

So can anyone help me flip the y-axis and enlarge it when it gets printed but leave my view as it currently is (unflipped and not enlarged)? I can't seem to find any useful information on how to do either, because I'm not working with text. Any help would be appreciated.

If you would like to email me, you can do so at: ALeonard@bruker-axs.com

GeneralRe: RE: printing a graphic Pin
Mike13-Apr-00 11:35
Mike13-Apr-00 11:35 
Generaladd item under columns in a CListView Pin
Derek19-Mar-00 19:16
Derek19-Mar-00 19:16 
GeneralRE: add item under columns in a CListView Pin
Member 105421-Mar-00 4:50
Member 105421-Mar-00 4:50 
Generaladding items under multi columns in a CListView Pin
Derek19-Mar-00 19:13
Derek19-Mar-00 19:13 
Questionhow to change the colour of text after it been highlight Pin
Anonymous19-Mar-00 14:01
suss Anonymous19-Mar-00 14:01 
Generalpassing events from one prog to another Pin
Anonymous18-Mar-00 21:58
suss Anonymous18-Mar-00 21:58 
QuestionBuilding ActiveX Server Controls Remotely? Pin
perplexed17-Mar-00 14:43
perplexed17-Mar-00 14:43 
QuestionBuilding ActiveX Server Controls Remotely? Pin
perplexed17-Mar-00 14:29
perplexed17-Mar-00 14:29 
QuestionHow add controls to CMDIChildWnd ? /more .../ Pin
PiotrB17-Mar-00 5:25
PiotrB17-Mar-00 5:25 
GeneralWSAENOBUFS error in Windows 2000 Pin
Thales P. Carvalho16-Mar-00 5:29
Thales P. Carvalho16-Mar-00 5:29 
QuestionGIF files/images - where can I get some source code samples? Pin
Member 419516-Mar-00 4:39
Member 419516-Mar-00 4:39 
AnswerRe: GIF files/images - where can I get some source code samples? Pin
Paul Selormey10-Apr-00 1:44
Paul Selormey10-Apr-00 1:44 
GeneralBitmap in a MDI Pin
JohnDodson15-Mar-00 20:49
professionalJohnDodson15-Mar-00 20:49 
GeneralRE: Bitmap in a MDI Pin
Mike Dunn18-Mar-00 19:24
Mike Dunn18-Mar-00 19:24 
GeneralRe: Bitmap in a MDI Pin
Paul Selormey10-Apr-00 1:49
Paul Selormey10-Apr-00 1:49 
GeneralCustom Control in a DLL Pin
Russell Robinson15-Mar-00 20:30
Russell Robinson15-Mar-00 20:30 
QuestionHow can I give a 30 day working version of a program? Pin
Erich Ruth15-Mar-00 9:28
Erich Ruth15-Mar-00 9:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.