void FdoSmLpGrdDataPropertyDefinition::Update( FdoPhysicalPropertyMapping* pPropOverrides ) { FdoSmPhMgrP pPhysical = GetLogicalPhysicalSchema()->GetPhysicalSchema(); FdoRdbmsOvDataPropertyDefinition* pDataPropOverrides = dynamic_cast<FdoRdbmsOvDataPropertyDefinition*>(pPropOverrides); // Error if the overrides are not for a data property if ( pPropOverrides && !pDataPropOverrides ) AddWrongOverrideTypeError(); FdoStringP ovColName; if ( pDataPropOverrides ) { // Get the column name from the physical overrides, if specified. FdoRdbmsOvColumnP columnOverrides = pDataPropOverrides->GetColumn(); if ( columnOverrides ) { SetIsFixedColumn( true ); if ( wcslen(columnOverrides->GetName()) > 0 ) ovColName = columnOverrides->GetName(); } } if ( (ovColName == L"") && (GetElementState() == FdoSchemaElementState_Unchanged) && GetIsFromFdo() ) { // Always make column name fixed when this object is from an FDO config document. // In this case this property must attach to an existing column so must // prevent the column name from being mangled. // Property always attaches to a column in the providers neutral case. // An explicit override must be supplied to attach to column whose // name is of another case. ovColName =GetName(); SetIsFixedColumn( true ); } if ( (!RefBaseProperty()) && ((GetElementState() == FdoSchemaElementState_Added) || GetIsFromFdo()) ) { // Set column name from override when property is not inherited and it is // new or from a config doc. if ( ovColName.GetLength() > 0 ) { // For foreign columns, root column is always the one // specified in the overrides. if ( ColumnIsForeign() ) SetRootColumnName( ovColName ); SetColumnName( ovColName ); } } else if ( GetElementState() == FdoSchemaElementState_Modified ) { if ( (ovColName.GetLength() > 0) && (ovColName.ICompare(Get_ColumnName()) != 0) ) AddColNameChangeError( ovColName ); } }
int CFolderListCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CListCtrl::OnCreate(lpCreateStruct) == -1) return -1; m_imlLargeIcons.Create( 32, 32, ILC_COLOR, 8, 8 ); m_imlSmallIcons.Create( 16, 16, ILC_COLOR, 8, 8 ); m_imlHeader.Create( 16, 16, ILC_MASK, 2, 2 ); SetImageList( &m_imlLargeIcons, LVSIL_NORMAL ); SetImageList( &m_imlSmallIcons, LVSIL_SMALL ); InsertColumn( 0, _T(""), LVCFMT_LEFT, 100, 0 ); InsertColumn( 1, _T(""), LVCFMT_RIGHT, 100, 1 ); InsertColumn( 2, _T(""), LVCFMT_RIGHT, 100, 2 ); SetColumnName(); SetExtendedStyle( LVS_EX_GRIDLINES | LVS_EX_FULLROWSELECT ); ModifyStyle(0, LVS_SHOWSELALWAYS); SetViewType( flvtThumbnail ); CBitmap bmpUPArrow; CBitmap bmpDNArrow; bmpUPArrow.LoadBitmap( IDB_UPARROW ); bmpDNArrow.LoadBitmap( IDB_DNARROW ); m_imlHeader.Add( &bmpDNArrow, RGB( 0, 0, 0 ) ); m_imlHeader.Add( &bmpUPArrow, RGB( 0, 0, 0 ) ); GetHeaderCtrl()->SetDlgCtrlID( FLC_HEADER_ID ); GetHeaderCtrl()->SetImageList( &m_imlHeader ); SetSortType( m_nCurColumn, TRUE ); return 0; }