Click here to Skip to main content
15,923,557 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Poor little orphan button Pin
Derek Lakin20-Nov-01 23:32
Derek Lakin20-Nov-01 23:32 
GeneralRe: Poor little orphan button Pin
Derek Lakin22-Nov-01 0:54
Derek Lakin22-Nov-01 0:54 
GeneralDialog Box Problems Pin
19-Nov-01 6:29
suss19-Nov-01 6:29 
GeneralRe: Dialog Box Problems Pin
Carlos Antollini19-Nov-01 7:54
Carlos Antollini19-Nov-01 7:54 
GeneralRe: Dialog Box Problems Pin
Michael Dunn19-Nov-01 7:57
sitebuilderMichael Dunn19-Nov-01 7:57 
GeneralRe: Dialog Box Problems Pin
mvworld19-Nov-01 10:46
mvworld19-Nov-01 10:46 
GeneralPrinting - positioning problem Pin
pmarki19-Nov-01 6:09
pmarki19-Nov-01 6:09 
GeneralRe: Printing - positioning problem Pin
Rassman20-Nov-01 5:18
Rassman20-Nov-01 5:18 
It will be different depending on the selected printer and the resolution selected on it. You size to the printers parameters. Using GetDeviceCaps gives you all you need to calculate your graphic size or text formating.

HORZSIZE Width, in millimeters, of the physical screen.
VERTSIZE Height, in millimeters, of the physical screen.
NUMFONTS Number of device-specific fonts. Use printer matched fonts if possible (though most are good anyway).
ASPECTX Relative width of a device pixel used for line drawing.
ASPECTY Relative height of a device pixel used for line drawing.
ASPECTXY Diagonal width of the device pixel used for line drawing
PHYSICALWIDTH For printing devices: the width of the physical page, in device units. For example, a printer set to print at 600 dpi on 8.5"x11" paper has a physical width value of 5100 device units. Note that the physical page is almost always greater than the printable area of the page, and never smaller.
PHYSICALHEIGHT For printing devices: the height of the physical page, in device units. For example, a printer set to print at 600 dpi on 8.5"x11" paper has a physical height value of 6600 device units. Note that the physical page is almost always greater than the printable area of the page, and never smaller.
PHYSICALOFFSETX For printing devices: the distance from the left edge of the physical page to the left edge of the printable area, in device units. For example, a printer set to print at 600 dpi on 8.5"x11" paper, that cannot print on the leftmost 0.25" of paper, has a horizontal physical offset of 150 device units.
PHYSICALOFFSETY For printing devices: the distance from the top edge of the physical page to the top edge of the printable area, in device units. For example, a printer set to print at 600 dpi on 8.5"x11" paper, that cannot print on the topmost 0.5" of paper, has a vertical physical offset of 300 device units


If your using the CPrintDialog then LPDEVMODE GetDevMode( ) will get you all the information you want in one go.
But the point is, that you must scale to printed page in much the same way as you do for the screen and each of its modes.

Experiment with the DEVMODE structure, what you will find is that you can scale text/graphics by the pel size, so that with a function such as

(xpos-ypos in mm or points)
PrintMyTextOnPaperAndBanLongFunctionNamesToo(xpos,ypos,LPCTSTR Text)

You can get accurate printing to 1/10th mm


We do it for the joy of seeing the users struggle.
GeneralMicrosoft FlexGrid Control 6.0 Pin
19-Nov-01 5:37
suss19-Nov-01 5:37 
GeneralRe: Microsoft FlexGrid Control 6.0 Pin
Carlos Antollini19-Nov-01 5:51
Carlos Antollini19-Nov-01 5:51 
Questionhow to move (drag) controls in the dialog? Pin
19-Nov-01 5:20
suss19-Nov-01 5:20 
AnswerRe: how to move (drag) controls in the dialog? Pin
Andres Manggini19-Nov-01 9:49
Andres Manggini19-Nov-01 9:49 
GeneralExplorer FolderView Pin
TusharKarsan19-Nov-01 5:07
TusharKarsan19-Nov-01 5:07 
QuestionWTL FormView: Where are the scrollbars? Pin
TusharKarsan19-Nov-01 4:37
TusharKarsan19-Nov-01 4:37 
GeneralUnsuported operations Pin
19-Nov-01 4:34
suss19-Nov-01 4:34 
GeneralRe: Unsuported operations Pin
moliate19-Nov-01 7:59
moliate19-Nov-01 7:59 
QuestionHow to get CD-ROM Manufacturer string? Pin
Rui Lopes19-Nov-01 4:19
Rui Lopes19-Nov-01 4:19 
GeneralPrinting Pin
mazy19-Nov-01 3:57
mazy19-Nov-01 3:57 
GeneralWhy I can't get record from database Pin
white jungle19-Nov-01 2:07
white jungle19-Nov-01 2:07 
GeneralRe: Why I can't get record from database Pin
Carlos Antollini19-Nov-01 2:16
Carlos Antollini19-Nov-01 2:16 
GeneralRe: Why I can't get record from database Pin
white jungle19-Nov-01 2:27
white jungle19-Nov-01 2:27 
GeneralRe: Why I can't get record from database Pin
Joel Lucsy19-Nov-01 3:04
Joel Lucsy19-Nov-01 3:04 
GeneralMFC and DLL... Pin
19-Nov-01 0:45
suss19-Nov-01 0:45 
GeneralRe: MFC and DLL... Pin
Cathy19-Nov-01 11:58
Cathy19-Nov-01 11:58 
GeneralAnti-Alias Pin
19-Nov-01 0:41
suss19-Nov-01 0:41 

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.