TxSetScrollPos

ITextHost::TxSetScrollPos method

Sets the position of the scroll box (thumb) in the specified scroll bar and, if requested, redraws the scroll bar to reflect the new position of the scroll box.

Syntax


BOOL TxSetScrollPos(
  [in] INT  fnBar,
  [in] INT  nPos,
  [in] BOOL fRedraw
);

Parameters

fnBar [in]

Type: INT

Scroll bar flag. If this is SB_HORZ, horizontal scrolling is done. By default, vertical scrolling is done.

nPos [in]

Type: INT

New position in scroll box. This must be within the range of scroll bar values set by ITextHost::TxSetScrollRange.

fRedraw [in]

Type: BOOL

Redraw flag. If TRUE, the scroll bar is redrawn with the new position of the scroll box. If FALSE, the scroll bar is not redrawn.

Return value

Type: BOOL

Return TRUE if the method succeeds.

Return FALSE if the method fails.

Remarks

This method is only valid when the control is in-place active; calls while the control is inactive may fail.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Textserv.h

DLL

Msftedit.dll

See also

ITextHost
Reference
TxSetScrollRange
Conceptual
Windowless Rich Edit Controls

 

 

Show:
© 2016 Microsoft