Share via


IOleControlSite::TransformCoords (Windows CE 5.0)

Send Feedback

Converts between a POINTL structure expressed in HIMETRIC units (as is standard in OLE) and a POINTF structure expressed in units specified by the container. By converting the methods, the control can ensure that it sends coordinate information to the container in units that are directly usable in the container without additional conversion.

HRESULT TransformCoords(   POINTL* pPtlHimetric ,   POINTF* pPtfContainer ,   DWORD dwFlags);

Parameters

  • pPtlHimetric
    [in, out] Address of a POINTL structure containing coordinates expressed in HIMETRIC units. This is an [in] parameter when dwFlags contains XFORMCOORDS_HIMETRICTOCONTAINER; it is [out] with XFORMCOORDS_CONTAINERTOHIMETRIC. In the latter case, the contents are undefined on error.
  • pPtfContainer
    [in, out] Address of a caller-allocated POINTF structure that receives the converted coordinates. This is an [in] parameter when dwFlags contains XFORMCOORDS_CONTAINERTOHIMETRIC; it is [out] with XFORMCOORDS_HIMETRICTOCONTAINER. In the latter case, the contents are undefined on error.
  • dwFlags
    [in] Flags indicating the exact conversion to perform. The dwFlags parameter can be any combination of the following values except where indicated:
    Flag Value Description
    XFORMCOORDS_POSITION The coordinates to convert represent a position point. Cannot be used with XFORMCOORDS_SIZE.
    XFORMCOORDS_SIZE The coordinates to convert represent a set of dimensions. Cannot be used with XFORMCOORDS_POSITION.
    XFORMCOORDS_HIMETRICTOCONTAINER The operation converts pptlHimetric into pptfContainer. Cannot be used with XFORMCOORDS_CONTAINERTOHIMETRIC.
    XFORMCOORDS_CONTAINERTOHIMETRIC The operation converts pptfContainer into pptlHimetric. Cannot be used with XFORMCOORDS_HIMETRICTOCONTAINER.

Return Values

This method supports the following return values:

Value Description
S_OK The conversion was performed successfully.
E_NOTIMPL The container does not require any special coordinate conversions. The container deals completely in HIMETRIC.
E_INVALIDARG The call contains an invalid argument.
E_POINTER The address in pptlHimetric or pptfContainer is not valid. For example, it may be NULL.
E_UNEXPECTED The call to the method unexpectedly failed.

Remarks

A control uses this method when it has to send coordinates to a container within an event or some other custom call or when the control has container coordinates that it needs to convert into HIMETRIC units.

Requirements

OS Versions: Windows CE 4.0 and later.
Header: ocidl.h.

See Also

COM Interfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.