BCGControlBar Pro for MFC
virtual BOOL CBCGPGridCtrl::CanHideColumn ( int  nColumn) const
inlinevirtual

Called by the framework to determine whether it should hide a column during drag-and-drop operations.

Returns
Should return TRUE, if the specified column can be hidden during drag-and-drop operations; otherwise FALSE.
Parameters
nColumnSpecifies the zero-based index of column.

The framework calls this function to check out whether the grid can hide the specific column during drag-and-drop operation. Override this function and return FALSE to prevent hiding of a specific column. To prevent hiding of every column during drag-and-drop you should call CBCGPGridCtrl::EnableHeader without flag BCGP_GRID_HEADER_HIDE_ITEMS.

For example:

EnableHeader (BCGP_GRID_HEADER_MOVE_ITEMS | BCGP_GRID_HEADER_SORT);