Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Ribbon Bar Animations Collapse All
Subject Author Date
Burak Petekkaya Apr 30, 2007 - 9:19 AM

Hi,

I want to use ribbon bar in a terminal service. But when the program starts with ribbon bar in the terminal service the animations,color changes of groupboxes and also the fade in - fade out actions of the File menu makes the program slow. So, How can I disable all of the animations and changes of the menus ?

Technical Support Apr 30, 2007 - 2:19 PM

The animations are controlled by the paint manager rather than by particular controls. There are several ways to turn off all the animations. You can create and use a custom paint manager that is derived from the supported paint managers and implements the CExtPaintManager::Animation_GetParameters() virtual method like as follows:

const CExtAnimationParameters *
      CExtPaintManager::Animation_GetParameters(
            INT eAPT, // __EAPT_*** animation type
            CObject * pHelperSrc,
            const CExtAnimationClient * pAC,
            LPARAM lParam // = 0L
            ) const
{
      ASSERT_VALID( this );
      ASSERT( pAC != NULL );
      eAPT;
      pHelperSrc;
      pAC;
      lParam;
      return (&g_DefAnimationParametersEmpty);
}
Another approach is to reset the global animation templates used by the paint manager whe your application starts:
      CExtPaintManager::g_DefAnimationParametersNormal
            = CExtPaintManager::g_DefAnimationParametersSlow
            = CExtPaintManager::g_DefAnimationParametersVerySlow
            = CExtPaintManager::g_DefAnimationParametersVerySlowAndSmooth
            = CExtPaintManager::g_DefAnimationParametersEmpty;

Burak Petekkaya May 1, 2007 - 2:55 AM

Hello again,

I tried to implement the second solution in my application and I reset the globals as you said. But it did not solve my problem. Still the button group’s colour change when we move on it with mouse and also still our menus are opening and closing slowly (like transparent).
I saw "SetupUiAdvancedOptions()" function in your examples and modified it as I want
{
......................
CExtPopupMenuWnd::g_bMenuWithShadows = false;
CExtPopupMenuWnd::g_bMenuShowCoolTips = true;
CExtPopupMenuWnd::g_bMenuExpanding = false;
CExtPopupMenuWnd::g_bMenuHighlightRarely = false;
CExtPopupMenuWnd::g_bMenuExpandAnimation = false;
CExtPopupMenuWnd::g_bUseDesktopWorkArea = true;
CExtPopupMenuWnd::g_DefAnimationType =    CExtPopupMenuWnd::__AT_NONE;
.............
}
But it could not be the soultion too..

What am I doing wrong?Do you have any other suggestions?

Technical Support May 1, 2007 - 12:25 PM


Please try the code below

CExtPopupMenuWnd::g_bMenuWithShadows = false;
CExtPopupMenuWnd::g_bMenuShowCoolTips = true;
CExtPopupMenuWnd::g_bMenuExpanding = false;
CExtPopupMenuWnd::g_bMenuHighlightRarely = false;
CExtPopupMenuWnd::g_bMenuExpandAnimation = false;
CExtPopupMenuWnd::g_DefAnimationType = CExtPopupMenuWnd::__AT_NONE;

CExtPopupMenuWnd::g_nDefaultFadeOutAnimationStepCount = 0;
CExtPopupMenuWnd::g_nDefaultFadeOutAnimationEllapse = 0;
CExtPaintManager::g_DefAnimationParametersNormal
      = CExtPaintManager::g_DefAnimationParametersSlow
      = CExtPaintManager::g_DefAnimationParametersVerySlow
      = CExtPaintManager::g_DefAnimationParametersVerySlowAndSmooth
      = CExtPaintManager::g_DefAnimationParametersEmpty;
Invoke it after the code that loads the ribbon bar’s state.

You will also need to fix the following issue: the CExtPopupMenuWnd::g_nDefaultFadeOutAnimationStepCount and CExtPopupMenuWnd::g_nDefaultFadeOutAnimationEllapse static properties should be public instead of protected.

Burak Petekkaya May 3, 2007 - 12:45 AM

Thanks for the solution. The animations had dissappeared..