Microsoft KB Archive/104791

= PRB: Object Appears Larger During Visual Editing =

Article ID: 104791

Article Last Modified on 12/3/2003

-

APPLIES TO

 Microsoft OLE 2.0 Microsoft OLE 4.0, when used with:  Microsoft Windows NT 4.0

 Microsoft Windows NT 3.51 Service Pack 5

 Microsoft Windows 95 </li></ul>

-

<div class="notice_section">

This article was previously published under Q104791

<div class="symptoms_section">

SYMPTOMS
An OLE 2.0 object appears larger during visual editing compared to the loaded state.

<div class="cause_section">

CAUSE
The Windows application programming interface (API) LPtoDP is being used to convert the size of the object from MM_HIMETRIC to MM_TEXT. The object is then drawn with the MM_TEXT coordinates as the bounding rectangle.

<div class="resolution_section">

RESOLUTION
LPtoDP is dependent on the current mapping mode to perform a conversion from logical points to device points. For a more accurate transformation, a function must be written to "manually" convert the units from MM_HIMETRIC to MM_TEXT by using GetDeviceCaps to get the logical pixels per inch for use in the conversion. The OLE2UI library, included with the OLE 2.0 toolkit, already includes several transformation functions to properly convert the units:

For more information on these functions, consult the "User Interface Dialog Help" help file (OLE2UI.HLP) included with the OLE 2.0 toolkit.

Additional query words: 2.00 3.50 4.00

Keywords: kbprogramming kbprb KB104791

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.