Partilhar via


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

// m_sizeExtent is a member of CComControlBase that holds the 
// control's extents in HIMETRIC units.
// Use AtlHiMetricToPixel to find the extent of the control in pixels.
AtlHiMetricToPixel(&m_sizeExtent, &sz);
ATLTRACE("Width = %d, Height = %d\n", sz.cx, sz.cy);

Requirements

Header: atlwin.h

See Also

Reference

AtlPixelToHiMetric

Other Resources

Pixel/HIMETRIC Conversion Global Functions