I have been using Prof-UIS v2.82 in MFC for some time now and I have a question regarding CExtGridCellCheckBox and CExtGridCellComboBox. I derived classes from those in order to be able to catch their events (OnInplaceControlCreate) and get therefore their data when changed. My problem is that the user cannot change the check box value using the keyboard. but can type next to it while I would like to prevent that. Regarding the ComboBox the user can type values even if they don’t exist in its list (which is wrong) and the event will not run to give me the data. The only way for the event to run is using the mouse.
My question is if there is a way to use with these controls both mouse and keyboard overcoming the problems above. Should I use a different event? Should derive them using some template I forgot?
The derived classes follow.
class DataGridCellCheckBox : public CExtGridCellCheckBox
{
public:
DECLARE_SERIAL( DataGridCellCheckBox );
IMPLEMENT_ExtGridCell_Clone( DataGridCellCheckBox, CExtGridCellCheckBox );
DataGridCellCheckBox(CExtGridDataProvider *pDataProvider = NULL);
~DataGridCellCheckBox();
virtual HWND DataGridCellCheckBox::OnInplaceControlCreate(
CExtGridWnd & wndGrid, LONG nVisibleColNo, LONG nVisibleRowNo, LONG nColNo, LONG nRowNo,
INT nColType, INT nRowType, const RECT & rcCellExtra, const RECT & rcCell,
const RECT & rcInplaceControl, LONG nLastEditedColNo, LONG nLastEditedRowNo);
/*virtual bool OnClick(CExtGridWnd & wndGrid, const CExtGridHitTestInfo & htInfo,
UINT nChar, UINT nRepCnt, UINT nFlags);*/
};
//////////////////////////////////////////////////////////////////////////////////////////
class DataGridCellComboBox : public CExtGridCellComboBox
{
public:
DECLARE_SERIAL( DataGridCellComboBox );
IMPLEMENT_ExtGridCell_Clone( DataGridCellComboBox, CExtGridCellComboBox );
DataGridCellComboBox(CExtGridDataProvider *pDataProvider = NULL);
~DataGridCellComboBox();
virtual HWND DataGridCellComboBox::OnInplaceControlCreate(
CExtGridWnd & wndGrid, LONG nVisibleColNo, LONG nVisibleRowNo, LONG nColNo, LONG nRowNo,
INT nColType, INT nRowType, const RECT & rcCellExtra, const RECT & rcCell,
const RECT & rcInplaceControl, LONG nLastEditedColNo, LONG nLastEditedRowNo);
};