Print Page | Close Window

CalcMinEventHeight

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=13444
Printed Date: 28 September 2024 at 3:01pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CalcMinEventHeight
Posted By: zitz
Subject: CalcMinEventHeight
Date Posted: 18 February 2009 at 1:03pm
Hello. I use Xtreme ToolkitPro v13.0.0.
My minimal Event height is bigger then default (22), and when redrawing still dumped into your min height...
I dont understand how fix it...



Replies:
Posted By: mdoubson
Date Posted: 20 February 2009 at 4:02pm
What is non-standard in your settings and setup? Large font? Big Images? Give some details please

-------------
Mark Doubson, Ph.D.


Posted By: zitz
Date Posted: 21 February 2009 at 2:36am
1. I use my custom font for CXTPCalendarThemeOffice2007::CTOEvent, my font is bigger then default (it is dynamic).


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


2. I use my custom Custom Icons (icons 16x16)
If you add your icon 16x16 - it does not draw because event height is small - need overload and add that height is not less 22.


Posted By: zitz
Date Posted: 02 March 2009 at 1:34am
How can i upload picture to this forum?

The icon disappears when you drag:


Icon "plus" - 16x16.
Some times icons is not showing at all day part (unable to repeat :( )



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net