IOleControlSite::TransformCoords method
Converts coordinates expressed in HIMETRIC units (as is standard in OLE) to the units specified by the container.
Syntax
HRESULT TransformCoords( [in, out] POINTL *pPtlHimetric, [in, out] POINTF *pPtfContainer, [in] 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 an [out] parameter 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 an [out] parameter with XFORMCOORDS_HIMETRICTOCONTAINER. In the latter case, the contents are undefined on error.
- dwFlags [in]
-
Flags indicating the exact conversion to perform. This parameter can be any combination of the following values, except as indicated.
Return value
This method can return the standard return values E_INVALIDARG and E_UNEXPECTED, as well as the following values.
| Return code | Description |
|---|---|
|
The method completed successfully. |
|
The container does not require any special coordinate conversions. The container deals completely in HIMETRIC. |
|
The address in pPtlHimetric or pPtfContainer is not valid. For example, it may be NULL. |
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
|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps only] |
|
Header |
|
|
IDL |
|
|
IID |
IID_IOleControlSite is defined as B196B289-BAB4-101A-B69C-00AA00341D07 |
See also