Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

HorizontalOffset

Defines the current horizontal offset (in pixels) of the displayed area.

C

int WINAPI SftTree_GetHorizontalOffset(HWND hwndCtl);
BOOL WINAPI SftTree_SetHorizontalOffset(HWND hwndCtl, int offset);
int WINAPI SftTreeSplit_GetHorizontalOffset(HWND hwndCtl, BOOL fLeft);
BOOL WINAPI SftTreeSplit_SetHorizontalOffset(HWND hwndCtl, int offset, BOOL fLeft);

C++

int CSftTree::GetHorizontalOffset() const;
int CSftTree::SetHorizontalOffset(int offset);
int CSftTreeSplit::GetHorizontalOffset(BOOL fLeft = FALSE) const;
int CSftTreeSplit::SetHorizontalOffset(int offset, BOOL fLeft = FALSE);

Parameters

hwndCtl

The window handle of the tree control.

offset

The new offset (in pixels) of the displayed area. If this parameter is greater than the displayable area width, the value is adjusted to scroll to the rightmost position possible.

fLeft

Set to TRUE to return or set the horizontal offset of the left side of a split tree control (the portion of the tree control containing the hierarchy). If FALSE is specified, the horizontal offset of the right side is returned or set.

Returns

GetHorizontalOffset returns the current offset (in pixels) of the displayed portion of the tree control.

SetHorizontalOffset returns TRUE if the function was successful, otherwise FALSE is returned.

Comments

The GetHorizontalOffset and SetHorizontalOffset functions define the current horizontal offset (in pixels) of the displayed area.

A tree control's displayable area can be wider than the tree control's window width. If the displayable area is wider, the tree control can be scrolled horizontally if it has a horizontal scroll bar (WS_HSCROLL window style). The current offset determines the amount of horizontal scrolling. The current offset of the displayed area can be set by the application using SetHorizontalOffset.

A tree control can only be scrolled horizontally if its displayable area is wider than the tree control window.

See Also C/C++ API | Categories | Notifications