Click here to Skip to main content
15,888,263 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionPrinting Document Pin
Ganesh_T10-Jul-06 21:52
Ganesh_T10-Jul-06 21:52 
AnswerRe: Printing Document Pin
Hamid_RT10-Jul-06 22:03
Hamid_RT10-Jul-06 22:03 
GeneralRe: Printing Document Pin
Ganesh_T10-Jul-06 22:39
Ganesh_T10-Jul-06 22:39 
GeneralRe: Printing Document Pin
Hamid_RT11-Jul-06 0:28
Hamid_RT11-Jul-06 0:28 
GeneralRe: Printing Document Pin
Ganesh_T11-Jul-06 1:04
Ganesh_T11-Jul-06 1:04 
AnswerRe: Printing Document Pin
Monty210-Jul-06 22:33
Monty210-Jul-06 22:33 
GeneralRe: Printing Document [modified] Pin
Ganesh_T10-Jul-06 22:40
Ganesh_T10-Jul-06 22:40 
GeneralRe: Printing Document Pin
Monty210-Jul-06 22:55
Monty210-Jul-06 22:55 
Ganesh_T wrote:
I want to use only SDK. no mfc classes. I haveposted the code in my reply to whitesky


Ok Ganesh listen up, The printer resolution is far more than screen's resolution.
So you need to calculate the number of times Printer resolution is greater than Screen's

So get printers Resolution use
int xPrnRes = GetDeviceCaps(hPrinterDC,LOGPIXELSX);
int yPrnRes = GetDeviceCaps(hPrinterDC,LOGPIXELSY);

Get Screens Res
int xScrnRes = GetDeviceCaps(hScreenDC,LOGPIXELSX);
int yScrnRes = GetDeviceCaps(hScreenDC,LOGPIXELSY);

Get Ratio
double ratio_x = (double)xPrnRes/(double)xScrnRes;
double ratio_y = (double)yPrnRes/(double)yScrnRes;


ok so if you have an image of say 100x100 px on screen and you want to print it the destination image will be of 100*ratio_x and 100*ratio_y

so instead of using BitBlt you have to use StretchBlt to stretch the Bitmap




You know you're obsessed with computer graphics when you're outside and you look up at the trees and think, "Wow! That's spectacular resolution!"

Only kings, presidents, editors, and people with tapeworms have the right to use the editorial "we."

Questiondetecting frame change in video Pin
Ram Murali10-Jul-06 21:46
Ram Murali10-Jul-06 21:46 
QuestionCTreeCtrl question Pin
zeus_master10-Jul-06 21:45
zeus_master10-Jul-06 21:45 
AnswerRe: CTreeCtrl question Pin
Hamid_RT10-Jul-06 21:47
Hamid_RT10-Jul-06 21:47 
AnswerRe: CTreeCtrl question Pin
Abhi Lahare10-Jul-06 21:52
Abhi Lahare10-Jul-06 21:52 
GeneralRe: CTreeCtrl question Pin
zeus_master10-Jul-06 22:07
zeus_master10-Jul-06 22:07 
QuestionProblem related to onPaint() Pin
LakshmiPathiRao10-Jul-06 21:33
LakshmiPathiRao10-Jul-06 21:33 
AnswerRe: Problem related to onPaint() Pin
Parthi_Appu10-Jul-06 21:41
Parthi_Appu10-Jul-06 21:41 
QuestionMFC Commandline.... Pin
Phil.Benson10-Jul-06 21:29
professionalPhil.Benson10-Jul-06 21:29 
AnswerRe: MFC Commandline.... Pin
Abhi Lahare10-Jul-06 21:47
Abhi Lahare10-Jul-06 21:47 
AnswerRe: MFC Commandline.... Pin
Monty210-Jul-06 22:20
Monty210-Jul-06 22:20 
GeneralRe: MFC Commandline.... Pin
Phil.Benson10-Jul-06 22:28
professionalPhil.Benson10-Jul-06 22:28 
QuestionIP ADRESS Pin
ashish dogra10-Jul-06 21:06
ashish dogra10-Jul-06 21:06 
AnswerRe: IP ADRESS Pin
Abhi Lahare10-Jul-06 21:12
Abhi Lahare10-Jul-06 21:12 
GeneralRe: IP ADRESS Pin
ashish dogra10-Jul-06 21:17
ashish dogra10-Jul-06 21:17 
AnswerRe: IP ADRESS Pin
A_Fa10-Jul-06 21:13
A_Fa10-Jul-06 21:13 
AnswerRe: IP ADRESS Pin
Hamid_RT10-Jul-06 21:27
Hamid_RT10-Jul-06 21:27 
Questionhow can i get the images into listcontrol. Pin
Amit Agarrwal10-Jul-06 20:35
Amit Agarrwal10-Jul-06 20:35 

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.