IDockProvider::DockPosition Property

Retrieves the current dock position of the Microsoft UI Automation element within a docking container.

Syntax

HRESULT IDockProvider::get_DockPosition(DockPosition *pRetVal);

Parameters

  • pRetVal
    [retval][out] The address of a variable that receives a value from the DockPosition enumerated type that specifies the location of an element, relative to the boundaries of the container and other elements within the container. This parameter is passed uninitialized.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

A docking container is a control that allows you to arrange child elements horizontally and/or vertically, relative to the boundaries of the container and each other.

Example

The following example shows how to return the DockPosition property.


    // dockPosition is a global variable of type DockPosition.

    HRESULT STDMETHODCALLTYPE BucketControl::get_DockPosition(DockPosition *pRetVal)
    {
        if (pRetVal == NULL)
        {
            return E_INVALIDARG;
        }
        *pRetVal = dockPosition;
        return S_OK;
    }
            

See Also

UI Automation Providers Overview