Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Custom Animation for Menus
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Custom Animation for Menus

 Post Reply Post Reply
Author
Message
coradinibr View Drop Down
Newbie
Newbie


Joined: 10 February 2004
Location: Brazil
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote coradinibr Quote  Post ReplyReply Direct Link To This Post Topic: Custom Animation for Menus
    Posted: 10 February 2004 at 8:11am

Hi,

I was using Xtreme Toolkit Standard and my company changed to Professional.

I am trying to set custom animation as I did with CXTCoolMenu but I cannot figure out how to do it !!!

In the documentation of Xtreme Toolkit Pro, there is a sample to set the customized animation but the variable m_nAnimationType is not a member of CXTCoolMenu !!!

Other information that does not match is that in the enumeration XTPAnimationType there is any definition for custom animations.

I've the overriden function for the custom animation and called the CXTAnimationMemDC::SetCustomAnimation( function ), but is does not call the the function for any type of animation, even the defaults.

Is it possible to set custom animation in the Professional version ?

Thanks in advance.

Evandro Coradini

 

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 10 February 2004 at 2:27pm

Hello, in new version need to override PainrManagers:

 

class CXTPOfficeThemeA : public CXTPOfficeTheme

{

void Animate(CDC* pDestDC, CDC* pSrcDC, CRect rc, XTPAnimationType animationType)

{

int nSteps = m_nAnimationSteps;

int nAnimationTime = m_nAnimationTime;

for (int i = 0; i < rc.Height();

i += (1 + (rc.Height() / nSteps)))

{

pDestDC->StretchBlt(rc.left, rc.top, rc.Width(), i, pSrcDC,

0, 0, rc.Width(), rc.Height(), SRCCOPY);

Sleep(nAnimationTime / nSteps);}

}

}

};

 

and set the theme

CXTPPaintManager::SetCustomTheme(new CXTPOfficeThemeA());

 

but in CXTPPaintManager Animate isn't declared as virtual, so add it yourself. In next version it will be fixed.

virtual void Animate(CDC* pDestDC, CDC* pSrcDC, CRect rc, XTPAnimationType animationType);

 



Edited by oleg
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.