If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
-
void.main
- In need of some credit

- Posts: 2
- Joined: Thu Jun 09, 2005 6:01 pm
- Location: CZE
Post
by void.main » Thu Jun 09, 2005 6:11 pm
Is there a way to get
margins when printing the page? Something like GetDeviceCaps(HDC, PHYSICALOFFSETX) with WinAPI ... I need "pixel-perfect" positioning, but dunohow
Thanx in advance!
-
eco
- Filthy Rich wx Solver

- Posts: 203
- Joined: Tue Aug 31, 2004 7:06 pm
- Location: Behind a can of Mountain Dew
-
Contact:
Post
by eco » Fri Jun 10, 2005 12:39 am
You can get it in millimeters from wxPageSetupDialogData. I don't know of a "pixel" perfect way.
-
void.main
- In need of some credit

- Posts: 2
- Joined: Thu Jun 09, 2005 6:01 pm
- Location: CZE
Post
by void.main » Fri Jun 10, 2005 6:48 am
I`ve tried, but it always return zero margins. Pseudocode like this one doesn't work well:
wxPageSetupDialogData pgDD;
pgDD.EnableMargins(TRUE);
pgDD.SetDefaultMinMargins(TRUE);
wxPageSetupDialog pgS(NULL, &pgDD);
pgS.ShowModal();
... and there we are - always zero :-/