共用方式為


MoveUnit method

Moves a display pointer to the specified position.

Syntax

HRESULT retVal = object.MoveUnit(eMoveUnit, lXPos);

Parameters

  • eMoveUnit [in]
    Type: DISPLAY_MOVEUNIT

    A DISPLAY_MOVEUNIT enumeration that specifies where the display pointer is to move.

  • lXPos [in]
    Type: LONG

    A LONG value that specifies how many pixels to the right from the beginning of the line the display pointer should be positioned.

Return value

Type: HRESULT

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

Remarks

Setting lXPos to -1 will position the display pointer at the same position horizontally as it was before.

Setting eMoveUnit to DISPLAY_MOVEUNIT_TopOfWindow places the display pointer at the beginning of the top line in the window. DISPLAY_MOVEUNIT_BottomOfWindow places the display pointer at the end of the last line in the window.

This method will ignore lXPos if eMoveUnit is set to DISPLAY_MOVEUNIT_CurrentLineStart, DISPLAY_MOVEUNIT_CurrentLineEnd, DISPLAY_MOVEUNIT_TopOfWindow, or DISPLAY_MOVEUNIT_BottomOfWindow.