Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Print page margins
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Print page margins

 Post Reply Post Reply
Author
Message Reverse Sort Order
Michl View Drop Down
Senior Member
Senior Member


Joined: 14 September 2007
Status: Offline
Points: 138
Post Options Post Options   Thanks (0) Thanks(0)   Quote Michl Quote  Post ReplyReply Direct Link To This Post Topic: Print page margins
    Posted: 20 May 2014 at 8:47am
Hi

It is not a good idea to use different bases for margin metrics.

CRect        m_rcMargins;   // Margins (mm*100 or inches*1000)

in class CXTPPrintOptions.

Example/problem:

  • You start ReportSample with language settings of Enlish (USA).

Margins will be initialized to a half inch.

  • Now change at runtime your local to e.g. "Germany (Germany)":


I expect that 0,5" is equal to 12,7mm.
If you print at different locales, you have different page margins.

I suggest to use always HIMETRICS or HIENGLISH unit type and only convert units for dialog. Or it's a helper necessary which saves the actual metric mode, because not to convert a value twice in WM_SETTINGCHANGE.

Have a nice day

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.