Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

OverheadWidth

Returns the width of the area added to the first column for hierarchical graphics components.

C

int WINAPI SftTree_GetOverheadWidth(HWND hwndCtl);
int WINAPI SftTreeSplit_GetOverheadWidth(HWND hwndCtl);

C++

int CSftTree::GetOverheadWidth() const;
int CSftTreeSplit::GetOverheadWidth() const;

Parameters

hwndCtl

The window handle of the tree control.

Returns

The return value is the width (in pixels) of the area reserved for non-cell displays, such as label pictures, expand/collapse buttons, tree lines and item pictures for all items.

Comments

The GetOverheadWidth function returns the width of the area added to the first column for hierarchical graphics components.

Due to the variable number of levels and the resulting hierarchical display, the width of the first column is always treated as a minimum width. The text portion of the first column will always be at least of the width specified using SetColumns, no matter what level the item is on. This can result in the first column being much wider than the defined width. To calculate the actual width of column 0, add the value returned by GetOverheadWidth to the width of column 0 as returned by GetColumns.

GetOverheadWidth returns the width of the area reserved for non-cell displays, such as label pictures, expand/collapse buttons, tree lines and item pictures for all items. If more levels are added to a hierarchy, the value increases.

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