TreeView_SetIndent macro (commctrl.h)

Sets the width of indentation for a tree-view control and redraws the control to reflect the new width. You can use this macro or send the TVM_SETINDENT message explicitly.

Syntax

BOOL TreeView_SetIndent(
   HWND hwnd,
   INT  indent
);

Parameters

hwnd

Type: HWND

Handle to the tree-view control.

indent

Type: INT

Width, in pixels, of the indentation. If this parameter is less than the system-defined minimum width, the new width is set to the system-defined minimum.

Return value

Type: BOOL

Although this macro is typed as a BOOL, it always returns zero.

Remarks

The system-defined minimum indent value is typically five pixels, but it is not fixed. To retrieve the exact value of the minimum indent on a particular system, use the TreeView_SetIndent macro with indent set to zero. Then use the TreeView_GetIndent macro to retrieve the minimum indent value.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header commctrl.h

See also

TVM_SETINDENT