Defines the indentation (in pixels) for item levels.
C
int WINAPI SftBox_GetIndentation(HWND hwndCtl); BOOL WINAPI SftBox_SetIndentation(HWND hwndCtl, int pixels);
C++
int CSftBox::GetIndentation() const; BOOL CSftBox::SetIndentation(int pixels);
hwndCtl
The window handle of the combo box control.
pixels
The indentation (in pixels) for item levels. Valid values are greater or equal to 0. Set to -1 to allow the combo box control to determine the best indentation, based on item picture width, font size, etc. -1 is the default.
GetIndentation returns the current indentation (in pixels) for each level, or -1 if the combo box control determines the indentation.
SetIndentation returns TRUE if the function was successful, otherwise FALSE is returned. FALSE is returned if pixels is less than -1.
The GetIndentation and SetIndentation functions define the indentation (in pixels) for item levels.
Each item is indented the specified number of pixels for each level. The GetItemLevel and SetItemLevel functions define an item's level number.
The indentation applies to the dropdown portion and the static portion of the combo box control.
It is possible to specify a very small value or even 0 for the level indentation. With such a small value, the hierarchy and its components, such as tree lines and expand/collapse buttons, may no longer have sufficient space and must be turned off by the application.
SetPixelScaling defines whether pixels is scaled for the current monitor DPI.
See Also C/C++ API | Categories | Notifications