Defines the scroll bar handling status.
C
BOOL WINAPI SftBox_GetDisableNoScroll(HWND hwndCtl); void WINAPI SftBox_SetDisableNoScroll(HWND hwndCtl, BOOL fDisable);
C++
BOOL CSftBox::GetDisableNoScroll() const; void CSftBox::SetDisableNoScroll(BOOL fDisable);
hwndCtl
The window handle of the combo box control.
fDisable
A value indicating the desired scroll bar status when scrolling is not possible. Set to TRUE to disable scroll bars, set to FALSE to hide scroll bars.
GetDisableNoScroll returns TRUE if scroll bars that are not needed are shown disabled, otherwise FALSE is returned.
The GetDisableNoScroll and SetDisableNoScroll functions define the scroll bar handling status.
The scroll bars are part of the dropdown portion of the combo box control. When scrolling is not possible because all items or columns are visible, the scroll bars are either hidden or shown disabled.
The initial setting is defined by the SFTBOXSTYLE_DISABLENOSCROLL window style when the combo box control is created. The window style cannot be modified after the combo box control has been created, SetDisableNoScroll is used instead. The scroll bars themselves are defined by the WS_VSCROLL and WS_HSCROLL window styles when the combo box control is created; SetDisableNoScroll does not add scroll bars.
The sizing box of a dropdown or dropdown list combo box (see SetShowResizer and SetSizeBox) is only available while scroll bars that are not needed are shown disabled. A combo box created with the WS_VSCROLL and WS_HSCROLL window styles can therefore make the sizing box available using SetDisableNoScroll(TRUE).
If the dropdown portion of a dropdown or dropdown list combo box is visible, it is hidden when SetDisableNoScroll is called.
int i;
InitColumn(&aCols[0], 0, 100, TEXT("Color"));
InitColumn(&aCols[1], 1, 100, TEXT("Description"));
SftBox_SetColumns(hwndBox, 2, aCols);
SftBox_SetShowHeaderDropDown(hwndBox, TRUE);// Column titles in the dropdown only
SftBox_SetDroppedHeight(hwndBox, 12); // Show up to 12 items
SftBox_SetDropDownOptimalWidth(hwndBox, TRUE);// The dropdown is as wide as its columns
SftBox_SetDisableNoScroll(hwndBox, TRUE); // Scroll bars always shown, needed for the sizing box
SftBox_SetShowResizer(hwndBox, TRUE); // The user can resize the dropdown
SftBox_SetDarkMode(hwndBox, SFTBOX_DARKMODE_AUTO);
// Register the size of the cell pictures before adding items.
// All pictures in the cells of a control are the same size.
{
SFTBOX_CELLINFOPARM CellInfo;
LONG index;
InitColumn(&aCols[0], 0, 100, _T("Color"));
InitColumn(&aCols[1], 1, 100, _T("Description"));
box.SetColumns(2, aCols);
box.SetShowHeaderDropDown(TRUE); // Column titles in the dropdown only
box.SetDroppedHeight(12); // Show up to 12 items
box.SetDropDownOptimalWidth(TRUE); // The dropdown is as wide as its columns
box.SetDisableNoScroll(TRUE); // Scroll bars always shown, needed for the sizing box
box.SetShowResizer(TRUE); // The user can resize the dropdown
box.SetDarkMode(SFTBOX_DARKMODE_AUTO);
// Register the size of the cell pictures before adding items.
// All pictures in the cells of a control are the same size.
{
SFTBOX_CELLINFOPARM CellInfo;See Also C/C++ API | Categories | Notifications