Print Page | Close Window

Print page margins

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=22304
Printed Date: 13 July 2025 at 6:11pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Print page margins
Posted By: Michl
Subject: Print page margins
Date 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




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net