In Microsoft Windows, there are four mapping modes that define how numbers relating to object sizes are to be passed and interpreted. These modes include ENGLISH, METRIC, TWIPS, and PIXELS (with ISOTROPIC and ANISOTROPIC being PIXEL modes). These mapping modes communicate physical sizes. For example, if an application using MM_HIMETRIC mode is to display a line ten centimeters long, the number of units would be 10,000. The resulting line drawn by the application on the screen will be ten centimeters long, regardless of the size of the video display area. In this case, the printed output will also be a line ten centimeters long.
Since people read display screens from a greater distance than they do printed copy, most applications written for Microsoft Windows display text in a larger size than they print it, using what is commonly referred to as logical resolution. For example, a ten-point font is easy enough to read on the printed page, but generally appears too small on a screen for comfortable reading. To afford more comfortable viewing, applications typically expand the size of the displayed text to some logical size. Using the logical size approach, a column of text that is physically six inches wide could appear eight inches wide on the screen, yet still print as a six-inch column.
While this display enlargement scheme works well from the user's point of view, a problem can occur when using physical sizes and pasting objects into container documents. The effect of the problem is to lose the correct size ratio between the pasted object and the text owned and displayed by the client application. That is, the text is scaled up for readability, but the pasted object may not be. Consequently, applications should take care to preserve the relative size and position of text and objects, which means that if it uses logical resolution for text, it should scale objects accordingly.
In the examples shown in Figure 8, a chart object has been pasted from a source application that uses physical size into container documents of two different client applications that use logical resolution for display of the text. The application displaying the container document on the right has scaled up the chart object to the logical size of the adjacent text to maintain the object/text size ratio. That is, it has been enlarged from its physical size by an amount that maintains its proportion to the text of the container document. In the document on the right, the application displays the chart object at its physical size, with no scaling to logical resolution for display. Both documents will print with the correct object-to-text-size ratio.
Figure 8. Chart object sized according to logical resolution and to physical size
In OLE, the units for specifying the size of drawn objects is HIMETRIC, which means object sizes are in physical units. However, client applications need not use the MM_HIMETRIC mapping mode to draw pasted objects to the display, but should rather map objects to the screen in the same manner as text. That is, if the client application displays text to the screen using a mapping mode that enlarges it, then objects should be mapped to the display in the same manner. Using the same mapping mode for both the text and objects is required to establish the correct object-to-text ratio as shown in the document on the left side of Figure 8. Since most Windows applications use logical resolution for this type of display mapping, it is suggested that OLE client applications also use logical resolution and set up their mapping modes and coordinate transforms accordingly. This allows objects to be moved from one application to another without changing their displayed size.
Note If your client application displays text in physical units, where point sizes are accurately maintained on the display (not scaled up for viewing), it can use MM_HIMETRIC mode for the display of pasted objects.