You should use a CExtGridCellInplaceSlider
-derived class which would paint slider like appearance in one case and text like appearance in other cases by implementing the following virtual method:
virtual void OnPaintRestArea(
const RECT & rcCellRest,
const CExtGridWnd & wndGrid,
CDC & dc,
LONG nVisibleColNo,
LONG nVisibleRowNo,
LONG nColNo,
LONG nRowNo,
INT nColType,
INT nRowType,
const RECT & rcCellExtra,
const RECT & rcCell,
const RECT & rcVisibleRange,
DWORD dwAreaFlags,
DWORD dwHelperPaintFlags
) const;
Your method should invoke the
CExtGridCellInplaceSlider::OnPaintRestArea()
parent class method for painting the slider. It should invoke the
CExtGridCellVariant::OnPaintRestArea()
parent class method for painting text. The
dwHelperPaintFlags
parameter contains a set of
__EGCPF_***
flags which provide you with all information about the selected/focused cell state.