CTradeGridBase::CTradeGridBase(int nRows /* = 1 */, int nCols /* = 0 */, int nFixedRows /* = 1 */, int nFixedCols /* = 0 */) :CHSGridTable(nRows,nCols,nFixedRows,nFixedCols) { m_pTradeTable = NULL; m_pDataList = NULL; SetEditable(FALSE); SetListMode(); EnableSelection(); SetFixedRowSelection(TRUE); SetFixedColumnSelection(FALSE); SetHeaderSort(); SetGridLines(); SetColumnResize(); SetRowResize(FALSE); SetVirtualMode(FALSE); SetDoubleBuffering(); SetAlwaysShowSelection(); SetFrameFocusCell(FALSE); SetTotalMode(FALSE); SetFilterMode(FALSE); AllowSelectRowInFixedCol(true); EnableDragRowMode(); SetDefCellHeight(25); SetDefCellMargin(2); }
QuoteTableCtrlGeneralSort::QuoteTableCtrlGeneralSort() { m_sDisplayRow = 9; SetEditable(FALSE); SetListMode(); EnableSelection(TRUE); SetFixedRowSelection(TRUE); SetHeaderSort(); SetGridLines(GVL_NONE); SetColumnResize(); SetRowResize(FALSE); SetVirtualMode(FALSE); SetDoubleBuffering(); SetAlwaysShowSelection(FALSE); SetFrameFocusCell(FALSE); AllowSelectRowInFixedCol(FALSE); EnableDragRowMode(FALSE); EnableDragAndDrop(FALSE); EnableTitleTips(FALSE); SetDefCellHeight(24); SetDefCellMargin(0); m_iColProp = (IHsColumnProperty*)CWinnerApplication::GetObject(OBJ_COLUMNPRO); m_iColorFontProt = (IHsColor*)CWinnerApplication::GetObject(OBJ_COLORCFG); m_iFont = (IHsFont*)CWinnerApplication::GetObject(OBJ_FONTCFG); if (m_iColorFontProt ) { SetGridBkColor(m_iColorFontProt->GetBlackgroundColor()); SetFixedBkColor(m_iColorFontProt->GetBlackgroundColor()); } else { SetGridBkColor(0); SetFixedBkColor(0); } }
BOOL GGridCtrl::Create(const RECT& rect, CWnd* parent, UINT nID, DWORD dwStyle ) { RECT rc; parent->GetClientRect( &rc ); rc.left += 3; rc.top += 15; rc.right -= 3; rc.bottom -= 3; if( !CGridCtrl::Create( rc, parent, nID, dwStyle ) ) return FALSE; EnableDragAndDrop(TRUE); SetFixedColumnSelection(TRUE); SetFixedRowSelection(TRUE); EnableColumnHide(); AutoSize(); SetCompareFunction(CGridCtrl::pfnCellNumericCompare); SetFixedRowCount(1); SetFixedColumnCount(1); EnableDragRowMode( FALSE ); EnableDragAndDrop( FALSE ); SetSingleRowSelection(TRUE); SetFixedRowSelection( TRUE ); SetFixedColumnSelection( TRUE ); SetRowHeight(0,20); return TRUE; }