Defines whether columns can be reordered using column drag & drop.
C
BOOL WINAPI SftBox_GetReorderColumns(HWND hwndCtl); void WINAPI SftBox_SetReorderColumns(HWND hwndCtl, BOOL fSet);
C++
BOOL CSftBox::GetReorderColumns() const; void CSftBox::SetReorderColumns(BOOL fSet);
hwndCtl
The window handle of the combo box control.
fSet
Set to TRUE to enable column reordering, otherwise set to FALSE.
GetReorderColumns returns TRUE if columns can be reordered by the user using the mouse, otherwise FALSE is returned.
The GetReorderColumns and SetReorderColumns functions define whether columns can be reordered using column drag & drop.
If column reordering is enabled, the user can drag a column header to a new position, in the static portion and in the dropdown portion. The SFTBOXN_REORDERED notification is sent to the parent window when the user has reordered the columns. By default, column reordering is enabled.
Individual columns can be locked in place even if column reordering is in effect, by adding the SFTBOX_COL_KEEPPOS value to the colFlag member of the SFTBOX_COLUMN structure. SFTBOX_COL_KEEPPOS causes the column to remain in the current display position.
If an application wants to retain the column order between sessions, the dispPos member of the SFTBOX_COLUMN structure must be saved for each column. When the application is restarted and the combo box is reinitialized, the values of the dispPos member can be restored for each column before calling SetColumns.
Parm.lpfnDelete = (SFTBOX_DELETEPROC) FontsDeleteCallback;
Parm.UserData = 0;
SftBox_SetDeleteCallback(m_hwndFonts, &Parm);
// FONT STYLE combo box
SftBox_SetSelectionStyle(m_hwndStyle, SFTBOX_SELECTION_CELL1);
SftBox_SetDroppedHeight(m_hwndStyle, 4);
SftBox_SetResizeHeader(m_hwndStyle, FALSE);
SftBox_SetReorderColumns(m_hwndStyle, FALSE);
SftBox_SetShowHeader(m_hwndStyle, SFTBOX_COLSTYLE_BUTTONTEXT);
SftBox_EnableSortIndicators(m_hwndStyle, TRUE, FALSE);// not sorted, but the column title is as tall as the others
SftBox_SetDarkMode(m_hwndStyle, SFTBOX_DARKMODE_AUTO);
InitColumn(&aCols[0], 0, 400, TEXT("Style"));
SftBox_SetColumns(m_hwndStyle, 1, aCols);
Parm.lpfnDelete = FontsDeleteCallback;
Parm.UserData = (SFTBOX_DWORD_PTR) this;
m_Fonts.SetDeleteCallback(&Parm);
// FONT STYLE combo box
m_Style.SetSelectionStyle(SFTBOX_SELECTION_CELL1);
m_Style.SetDroppedHeight(4);
m_Style.SetResizeHeader(FALSE);
m_Style.SetReorderColumns(FALSE);
m_Style.SetShowHeader(SFTBOX_COLSTYLE_BUTTONTEXT);
m_Style.EnableSortIndicators(TRUE, FALSE);// not sorted, but the column title is as tall as the others
m_Style.SetDarkMode(SFTBOX_DARKMODE_AUTO);
InitColumn(&aCols[0], 0, 400, _T("Style"));
m_Style.SetColumns(1, aCols);
See Also C/C++ API | Categories | Notifications