static int stCalcMinEventHeight( CXTPCalendarThemeOffice2007::CTOEvent* pEvent, CDC* pDC ) { CArray<CFont*, CFont*> arFonts;
arFonts.Add( FontHelper().GetFont( TRUE, FALSE, TRUE ) ); arFonts.Add( pEvent->m_fcsetNormal.fcsetLocation.Font() ); arFonts.Add( pEvent->m_fcsetNormal.fcsetStartEnd.Font() );
arFonts.Add( pEvent->m_fcsetSelected.fcsetSubject.Font() ); arFonts.Add( pEvent->m_fcsetSelected.fcsetLocation.Font() ); arFonts.Add( pEvent->m_fcsetSelected.fcsetStartEnd.Font() );
int nFontHeightMax = 0; CXTPCalendarUtils::GetMaxHeightFont( arFonts, pDC, &nFontHeightMax );
ASSERT( pEvent->GetHeightFormulaPart() ); if ( !pEvent->GetHeightFormulaPart() ) { ASSERT(FALSE); return pEvent->TBase::CalcMinEventHeight( pDC ); }
int nHeight = pEvent->GetHeightFormulaPart()->Calculate( nFontHeightMax ); return nHeight < 22 ? 22 : nHeight; }
int CCalendarView::CCalendarThemeOffice2007::CTOMonth_MultiDay::CalcMinEventHeight( CDC* pDC ) { return stCalcMinEventHeight( this, pDC ); }
int CCalendarView::CCalendarThemeOffice2007::CTOMonth_SingleDay::CalcMinEventHeight( CDC* pDC ) { return stCalcMinEventHeight( this, pDC ); }
int CCalendarView::CCalendarThemeOffice2007::CTODay_SingleDay::CalcMinEventHeight( CDC* pDC ) { return stCalcMinEventHeight( this, pDC ); }
int CCalendarView::CCalendarThemeOffice2007::CTODay_MultiDay::CalcMinEventHeight( CDC* pDC ) { return stCalcMinEventHeight( this, pDC ); }
int CCalendarView::CCalendarThemeOffice2007::CTOWeek_MultiDay::CalcMinEventHeight( CDC* pDC ) { return stCalcMinEventHeight( this, pDC ); }
int CCalendarView::CCalendarThemeOffice2007::CTOWeek_SingleDay::CalcMinEventHeight( CDC* pDC ) { return stCalcMinEventHeight( this, pDC ); }
|