Windows 3.1 Device Drivers (ddag31qh.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
ENABLERELATIVEWIDTHS
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define ENABLERELATIVEWIDTHS 768 
short Control(lpDevice, ENABLERELATIVEWIDTHS,
                  lpInData, lpOutData)
LPPDEVICE lpDevice;
LPINT lpInData;
LPINT lpOutData;
 
The ENABLERELATIVEWIDTHS escape enables or disables relative character
widths. When it is disabled (the default setting), each character's width
can be expressed as an integer number of device units. This expression
guarantees that the extent of a string will equal the sum of the extents of
the characters that make up the string. Such behavior enables applications
to build an extent table manually using one-character calls to the
GetTextExtent (GDI.91) function. When it is enabled, the width of a string
may or may not equal the sum of the widths of the characters in the string.
Applications that enable this feature are expected to retrieve the font's
extent table and compute relatively-scaled string widths themselves.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
 
lpDevice   Points to a PDEVICE structure specifying the destination device.
 
lpInData   Points to a 16-bit variable that specifies whether to enable or
           disable relative widths. If it is 1, relative widths are enabled;
           if 0, relative widths are disabled.
 
lpOutData  Points to a 16-bit variable that receives the previous relative
           character-width member.
 
Return Value
 
The return value is 1 if the escape is successful. Otherwise, the return
value is 0 if the escape is not successful, or if the escape is not
implemented.
 
Comments
 
The default state of this capability is zero; that is, relative character
widths are disabled.
 
Enabling this feature creates values that are specified as "font units" and
accepted and returned by the escapes described in this topic to be returned
in the relative units of the font.
 
It is assumed that only linear scaling devices will be dealt with in a
relative mode. Nonlinear scaling devices should not implement this escape.
 
See Also
 
PDEVICE