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; }
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); } }