Click here to Skip to main content
15,885,546 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Checking if a folder exists... Pin
David Crow17-Feb-05 3:55
David Crow17-Feb-05 3:55 
GeneralRe: Checking if a folder exists... Pin
Blake Miller17-Feb-05 7:59
Blake Miller17-Feb-05 7:59 
GeneralRe: Checking if a folder exists... Pin
Ryan Binns16-Feb-05 17:52
Ryan Binns16-Feb-05 17:52 
GeneralRe: Checking if a folder exists... Pin
digwizfox17-Feb-05 6:47
digwizfox17-Feb-05 6:47 
GeneralClient / Server Pin
densitet16-Feb-05 6:17
densitet16-Feb-05 6:17 
GeneralRe: Client / Server Pin
rocky_pulley16-Feb-05 8:20
rocky_pulley16-Feb-05 8:20 
GeneralRe: Client / Server Pin
densitet17-Feb-05 0:34
densitet17-Feb-05 0:34 
GeneralUnexpected printing behaviour Pin
Santanu Lahiri16-Feb-05 5:24
Santanu Lahiri16-Feb-05 5:24 
Hello all,

I am running into a somewhat odd problem with printing from an MFC program. I am getting printouts just fine, but there seems to be a difference between the preview page and the printed page. The preview, in this case, prints 40 lines to a page, while the printed version prints 41. Since the overall printout is about 64-65 pages long, this is causing the last few pages to be very different between the two.

I put in some TRACE statements to print the height of a line with each font type I am using, and this is what I got (the fonts are all Times New Roman, various point sizes):

For the Preview version:

Preparing Page 2
Page 2
Report Hdr: 00155
Page Hdr: 00095
Table Caption: 00115
Column Hdr: 00115
Table Body: 00095
Table Total: 00095
Page Footer: 00075
Report Footer: 00075
Printing Page 2
Line Start 1110
Line Start 1225
Line Start 1340
Line Start 1455
Line Start 1570
Line Start 1685
Line Start 1800
...
Line Start 5020
Line Start 5135
Line Start 5250
Line Start 5365
Line Start 5480
Line Start 5595


For the Print version:

Preparing Page 2
Page 2
Report Hdr: 00151
Page Hdr: 00094
Table Caption: 00114
Column Hdr: 00114
Table Body: 00094
Table Total: 00093
Page Footer: 00075
Report Footer: 00075
Printing Page 2
Line Start 1108
Line Start 1222
Line Start 1336
Line Start 1450
Line Start 1564
Line Start 1678
Line Start 1792
...
Line Start 4984
Line Start 5098
Line Start 5212
Line Start 5326
Line Start 5440
Line Start 5554
Line Start 5668


As you can see, the font heights are a little different. This is causing an extra line per page. I did not think this was possible, since I am using the default printer definition in both cases. Is there any way to compensate for this?

Thanks for any hint anyone can provide.

Santanu
GeneralUsing CDoc variable in MainFrm Pin
jw8116-Feb-05 3:55
jw8116-Feb-05 3:55 
GeneralRe: Using CDoc variable in MainFrm Pin
Roger Allen16-Feb-05 5:04
Roger Allen16-Feb-05 5:04 
GeneralRe: Using CDoc variable in MainFrm Pin
jw8116-Feb-05 21:46
jw8116-Feb-05 21:46 
GeneralRe: Using CDoc variable in MainFrm Pin
jw8118-Feb-05 23:10
jw8118-Feb-05 23:10 
GeneralSocket + Threading Pin
cj_rahul16-Feb-05 3:43
cj_rahul16-Feb-05 3:43 
GeneralRe: Socket + Threading Pin
Anonymous16-Feb-05 6:38
Anonymous16-Feb-05 6:38 
GeneralRe: Socket + Threading Pin
Tom Wright16-Feb-05 10:26
Tom Wright16-Feb-05 10:26 
GeneralSwitching between two different views in CSplitterWnd Pin
Anonymous16-Feb-05 3:20
Anonymous16-Feb-05 3:20 
GeneralRe: Switching between two different views in CSplitterWnd Pin
Iain Clarke, Warrior Programmer16-Feb-05 5:28
Iain Clarke, Warrior Programmer16-Feb-05 5:28 
GeneralRe: Switching between two different views in CSplitterWnd Pin
bilas16-Feb-05 5:37
bilas16-Feb-05 5:37 
GeneralRe: Switching between two different views in CSplitterWnd Pin
Iain Clarke, Warrior Programmer16-Feb-05 6:24
Iain Clarke, Warrior Programmer16-Feb-05 6:24 
GeneralRetrieving data from internet Pin
Kapgan16-Feb-05 3:17
Kapgan16-Feb-05 3:17 
GeneralRe: Retrieving data from internet Pin
greba16-Feb-05 6:47
greba16-Feb-05 6:47 
GeneralRe: Retrieving data from internet Pin
Ravi Bhavnani16-Feb-05 8:10
professionalRavi Bhavnani16-Feb-05 8:10 
GeneralRe: Retrieving data from internet Pin
ThatsAlok16-Feb-05 18:07
ThatsAlok16-Feb-05 18:07 
GeneralRe: Retrieving data from internet Pin
Luke9116-Feb-05 19:00
Luke9116-Feb-05 19:00 
Generalopening a vrml file Pin
Micealgleeson16-Feb-05 2:20
Micealgleeson16-Feb-05 2:20 

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.