Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Calendar
  New Posts New Posts RSS Feed - CalcMinEventHeight
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CalcMinEventHeight

 Post Reply Post Reply
Author
Message
zitz View Drop Down
Senior Member
Senior Member


Joined: 05 October 2008
Status: Offline
Points: 112
Post Options Post Options   Thanks (0) Thanks(0)   Quote zitz Quote  Post ReplyReply Direct Link To This Post Topic: CalcMinEventHeight
    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...
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 20 February 2009 at 4:02pm
What is non-standard in your settings and setup? Large font? Big Images? Give some details please
Back to Top
zitz View Drop Down
Senior Member
Senior Member


Joined: 05 October 2008
Status: Offline
Points: 112
Post Options Post Options   Thanks (0) Thanks(0)   Quote zitz Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
zitz View Drop Down
Senior Member
Senior Member


Joined: 05 October 2008
Status: Offline
Points: 112
Post Options Post Options   Thanks (0) Thanks(0)   Quote zitz Quote  Post ReplyReply Direct Link To This Post 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 :( )
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.