Defines the presence of expand/collapse buttons (other than level 0).
C
BOOL WINAPI SftBox_GetShowButtons(HWND hwndCtl); void WINAPI SftBox_SetShowButtons(HWND hwndCtl, BOOL fSet);
C++
BOOL CSftBox::GetShowButtons() const; void CSftBox::SetShowButtons(BOOL fSet);
hwndCtl
The window handle of the combo box control.
fSet
Set to TRUE to display expand/collapse buttons for all items (except items on level 0), otherwise set to FALSE.
GetShowButtons returns a value indicating whether expand/collapse buttons for items on all levels except level 0 are shown. TRUE is returned if expand/collapse buttons are shown, otherwise FALSE is returned.
The GetShowButtons and SetShowButtons functions define the presence of expand/collapse buttons (other than level 0).
The setting applies to the dropdown portion and the static portion of the combo box. When a combo box control is created, expand/collapse buttons are not shown.
If the dropdown portion of a dropdown or dropdown list combo box is currently displayed, SetShowButtons hides it and the selection is canceled (a SFTBOXN_SELENDCANCEL notification is sent).
SetShowButton0 can be used to enable or disable expand/collapse buttons on level 0. The appearance of the expand/collapse buttons can be defined using SetButtons.
Sft_InitPicture(&aThreeItemPictures[1]);
Sft_InitPicture(&aThreeItemPictures[2]);
Sft_SetPictureIcon(&aThreeItemPictures[0], m_ahIcons[ICON_FOLDER]); /* Expandable picture */
Sft_SetPictureIcon(&aThreeItemPictures[1], m_ahIcons[ICON_FOLDEROPEN]);/* Expanded picture */
Sft_SetPictureIcon(&aThreeItemPictures[2], m_ahIcons[ICON_DOCUMENT]); /* Leaf picture */
SftBox_SetPictures(hwndBox, aThreeItemPictures);
SftBox_SetTreeLineStyle(hwndBox, SFTBOX_TREELINE_AUTOMATIC);// Dotted or invisible tree lines, following the Windows theme
SftBox_SetShowButtons(hwndBox, TRUE); // Expand/collapse buttons (level 1..n)
SftBox_SetShowButton0(hwndBox, TRUE); // Expand/collapse buttons (level 0)
SftBox_SetButtons(hwndBox, SFTBOX_BUTTON_AUTOMATIC);// Button style follows the Windows theme
SftBox_SetDroppedHeight(hwndBox, 12); // Show up to 12 items
SftBox_SetDarkMode(hwndBox, SFTBOX_DARKMODE_AUTO);
// The level of an item defines the hierarchy: an item is a
// dependent of the closest preceding item with a lower level.
Sft_InitPicture(&aThreeItemPictures[1]);
Sft_InitPicture(&aThreeItemPictures[2]);
Sft_SetPictureIcon(&aThreeItemPictures[0], m_ahIcons[ICON_FOLDER]); /* Expandable picture */
Sft_SetPictureIcon(&aThreeItemPictures[1], m_ahIcons[ICON_FOLDEROPEN]);/* Expanded picture */
Sft_SetPictureIcon(&aThreeItemPictures[2], m_ahIcons[ICON_DOCUMENT]); /* Leaf picture */
m_Folders.SetPictures(aThreeItemPictures);
m_Folders.SetTreeLineStyle(SFTBOX_TREELINE_AUTOMATIC);// Dotted or invisible tree lines, following the Windows theme
m_Folders.SetShowButtons(TRUE); // Expand/collapse buttons (level 1..n)
m_Folders.SetShowButton0(TRUE); // Expand/collapse buttons (level 0)
m_Folders.SetButtons(SFTBOX_BUTTON_AUTOMATIC);// Button style follows the Windows theme
m_Folders.SetDroppedHeight(12); // Show up to 12 items
m_Folders.SetDarkMode(SFTBOX_DARKMODE_AUTO);
// The level of an item defines the hierarchy: an item is a
// dependent of the closest preceding item with a lower level.See Also C/C++ API | Categories | Notifications