I allow a user to enter various text information at specific printer coordinates and found it easier if the coordinates where entered as millimeters. However, using oPrn:cmsay(), the input must be in centimeters which then gets converted back to millimeters.
Was there a reason why centimeters was chosen as opposed to millimeters?
PrnOffset()
- Code: Select all Expand view
Escape( ( HDC ) _parnl( 1 ),
GETPRINTINGOFFSET,
NULL, NULL, ( LPPOINT ) &pt ) ;
After looking at this function, I went to the MSDN site and found the following information:
Article ID : 115762
Last Review : November 21, 2006
Revision : 3.2
This article was previously published under Q115762
The Win32 documentation for the Escape() function says that the GETPHYSPAGESIZE, GETPRINTINGOFFSET, and GETSCALINGFACTOR escapes are obsolete, but it fails to mention the recommended way to get this information.
The information retrieved by all three escapes can now be retrieved by calling GetDeviceCaps() with the appropriate index:
• For the GETPHYSPAGESIZE escape, the indexes to be used with GetDeviceCaps() are PHYSICALWIDTH and PHYSICALHEIGHT.
• For GETPRINTINGOFFSET, the indexes are PHYSICALOFFSETX and PHYSICALOFFSETY.
• For GETSCALINGFACTOR, the indexes are SCALINGFACTORX and SCALINGFACTORY.
All six new indexes are defined in the file WINGDI.H, though they are missing from the GetDeviceCaps() documentation.
I am currently using FiveWin 7.04 so the code may have already been changed. If not, is there a reason why this existing code should not be updated?