Compartilhar via


IXRVisualHost::GetSize (Compact 2013)

3/28/2014

This method retrieves the size dimensions of the graphical window for the container of this visual host.

Syntax

virtual HRESULT STDMETHODCALLTYPE GetSize(
    UINT* pWidth,
    UINT* pHeight
) = 0;

Parameters

  • pWidth
    [out] Pointer to an integer value that describes the width of the container for this visual host.
  • pHeight
    [out] Pointer to an integer value that describes the height of the container for this visual host.

Return Value

Returns an HRESULT that indicates success or failure.

Returns XR_E_INVALID_THREAD_ACCESS if this method was called from a thread different from the thread on which the system was initialized. A visual host can only be accessed on the thread that it was created on. Notice that most XAML for Windows Embedded APIs can only be accessed from a single thread.

Returns XR_E_INVALID_STATE if this method was called on an object in an invalid state, such as a host that was already destroyed, or a dialog that was closed without calling EndDialog.

Remarks

To adjust the size dimensions, you can retrieve them by using this method, perform a computation on the retrieved values, and then supply the updated values by calling IXRVisualHost::SetSize.

.NET Framework Equivalent

None.

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRVisualHost
IXRVisualHost::SetSize