Click here to Skip to main content
16,005,080 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC inter-object communication Pin
Alvaro Mendez10-Apr-03 11:13
Alvaro Mendez10-Apr-03 11:13 
GeneralRe: MFC inter-object communication Pin
Neville Franks10-Apr-03 10:54
Neville Franks10-Apr-03 10:54 
GeneralRe: MFC inter-object communication Pin
Gary Kirkham10-Apr-03 10:57
Gary Kirkham10-Apr-03 10:57 
GeneralRe: MFC inter-object communication Pin
Joel Lucsy10-Apr-03 16:10
Joel Lucsy10-Apr-03 16:10 
GeneralRe: MFC inter-object communication Pin
Neville Franks10-Apr-03 16:54
Neville Franks10-Apr-03 16:54 
GeneralRe: MFC inter-object communication Pin
Joel Lucsy11-Apr-03 3:07
Joel Lucsy11-Apr-03 3:07 
QuestionHow to get printer margins Pin
bumper10-Apr-03 9:18
bumper10-Apr-03 9:18 
AnswerRe: How to get printer margins Pin
Tim Smith10-Apr-03 10:12
Tim Smith10-Apr-03 10:12 
//
// Get the physical offset
//

CPoint ptPhysicalOffset (
    ::GetDeviceCaps (hDC, PHYSICALOFFSETX),
    ::GetDeviceCaps (hDC, PHYSICALOFFSETY)
    );

//
// Get the physical page size
//

CSize sizePhysical (
    ::GetDeviceCaps (hDC, PHYSICALWIDTH),
    ::GetDeviceCaps (hDC, PHYSICALHEIGHT)
    );

//
// Get the drawing size
//

CSize sizeDrawing (
    ::GetDeviceCaps (hDC, HORZRES),
    ::GetDeviceCaps (hDC, VERTRES)
    );


The physical offset is the left and top margin.

The physical size is the total size of the page.

The drawing size is the size of the area you can draw in.

Thus, the right margin is sizePhysical .cx - sizeDrawing .cx - ptPhysicalOffset .x.

The bottom margin is computed the same way.

Tim Smith

I'm going to patent thought. I have yet to see any prior art.
GeneralRe: How to get printer margins Pin
bumper10-Apr-03 11:21
bumper10-Apr-03 11:21 
GeneralClose button on DialogBox Pin
bumper10-Apr-03 9:14
bumper10-Apr-03 9:14 
GeneralRe: Close button on DialogBox Pin
Dominik Reichl10-Apr-03 9:21
Dominik Reichl10-Apr-03 9:21 
GeneralRe: Close button on DialogBox Pin
bumper10-Apr-03 11:04
bumper10-Apr-03 11:04 
GeneralRe: Close button on DialogBox Pin
valikac10-Apr-03 14:20
valikac10-Apr-03 14:20 
GeneralRe: Close button on DialogBox Pin
bumper11-Apr-03 7:39
bumper11-Apr-03 7:39 
Generallost in loops:) Pin
Overcat10-Apr-03 7:55
Overcat10-Apr-03 7:55 
GeneralRe: lost in loops:) Pin
Alvaro Mendez10-Apr-03 8:19
Alvaro Mendez10-Apr-03 8:19 
GeneralRe: lost in loops:) Pin
Nitron10-Apr-03 8:20
Nitron10-Apr-03 8:20 
GeneralAdding a nondlg based class to a project, but it doesnt show in clas wizard Pin
ns10-Apr-03 7:48
ns10-Apr-03 7:48 
GeneralRe: Adding a nondlg based class to a project, but it doesnt show in clas wizard Pin
Cedric Moonen10-Apr-03 20:54
Cedric Moonen10-Apr-03 20:54 
QuestionHow to getCheckedItems in a FormView Pin
gmlnd10-Apr-03 6:53
gmlnd10-Apr-03 6:53 
GeneralOracle Connection Problem Urgent!! Pin
nlecren10-Apr-03 6:00
nlecren10-Apr-03 6:00 
GeneralRe: Oracle Connection Problem Urgent!! Pin
Alvaro Mendez10-Apr-03 6:23
Alvaro Mendez10-Apr-03 6:23 
GeneralRe: Oracle Connection Problem Urgent!! Pin
nlecren10-Apr-03 6:46
nlecren10-Apr-03 6:46 
GeneralOracle Connection Problem Urgent!! Pin
Anonymous10-Apr-03 5:59
Anonymous10-Apr-03 5:59 
Generaleasy question about ServerSocket Pin
Martin_Viet10-Apr-03 5:57
Martin_Viet10-Apr-03 5:57 

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.