Skip to content

Latest commit

 

History

History
74 lines (49 loc) · 2.05 KB

pixel-himetric-conversion-global-functions.md

File metadata and controls

74 lines (49 loc) · 2.05 KB
description title ms.date f1_keywords ms.assetid
Learn more about: Pixel/HIMETRIC Conversion Global Functions
Pixel-HIMETRIC Conversion Global Functions
11/04/2016
atlwin/ATL::AtlHiMetricToPixel
atlwin/ATL::AtlPixelToHiMetric
ecb1b1b2-7e9d-4fbc-a855-16252d2d794c

Pixel/HIMETRIC Conversion Global Functions

These functions provide support for converting to and from pixel and HIMETRIC units.

Important

The functions listed in the following table cannot be used in applications that execute in the Windows Runtime.

Name Description
AtlHiMetricToPixel Converts HIMETRIC units (each unit is 0.01 millimeter) to pixels.
AtlPixelToHiMetric Converts pixels to HIMETRIC units (each unit is 0.01 millimeter).

AtlHiMetricToPixel

Converts an object's size in HIMETRIC units (each unit is 0.01 millimeter) to a size in pixels on the screen device.

extern void AtlHiMetricToPixel(
    const SIZEL* lpSizeInHiMetric,
    LPSIZEL lpSizeInPix);

Parameters

lpSizeInHiMetric
[in] Pointer to the size of the object in HIMETRIC units.

lpSizeInPix
[out] Pointer to where the object's size in pixels is to be returned.

Example

[!code-cppNVC_ATL_COM#49]

Requirements

Header: atlwin.h

AtlPixelToHiMetric

Converts an object's size in pixels on the screen device to a size in HIMETRIC units (each unit is 0.01 millimeter).

extern void AtlPixelToHiMetric(
    const SIZEL* lpSizeInPix,
    LPSIZEL lpSizeInHiMetric);

Parameters

lpSizeInPix
[in] Pointer to the object's size in pixels.

lpSizeInHiMetric
[out] Pointer to where the object's size in HIMETRIC units is to be returned.

Example

[!code-cppNVC_ATL_COM#51]

Requirements

Header: atlwin.h

See also

Functions