共用方式為


GetFocusRect method

Specifies the focus rectangle of an element behavior.

Syntax

HRESULT retVal = object.GetFocusRect(pRect);

Parameters

  • pRect [in]
    Type: RECT

    Specifies the rectangle that contains the focus area of the element behavior.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

You can implement the IElementBehaviorFocus interface and the GetFocusRect method to enable the element behavior to supply its own focus rectangle.

The coordinates are treated as relative to the upper-left corner of the element.