Print Page | Close Window

SetAnimationDelay documentation and divide by zero

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=5216
Printed Date: 26 June 2025 at 4:38am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: SetAnimationDelay documentation and divide by zero
Posted By: jansim
Subject: SetAnimationDelay documentation and divide by zero
Date Posted: 04 October 2006 at 11:49am
Hi,
 
In CXTPDockingPaneManager::SetAnimationDelay documentation
it is said :
"to disable animation set nAnimationDuration = 0"
 
It works fine with docked panes, however, when unpinning floating panes, the DoSlideStep method of the MiniWnd divides by a value that is setted with nAnimationDuration which is zero.
 
I use 1 which works juste fine, do you plan on fixing the divide by zero or the documentation to use 1 instead of 0 ?
 
Thanks
Jansim
 



Replies:
Posted By: Oleg
Date Posted: 05 October 2006 at 10:16am
Hello,
documentation right - set nAnimationDuration to 0, but not nAnimationInterval.
 
from code:
 m_nStepsCount = CXTPDockingPaneAutoHideWnd::m_nAnimationDuration / CXTPDockingPaneAutoHideWnd::m_nAnimationInterval;
set nAnimationInterval to any not 0 value.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: jansim
Date Posted: 16 October 2006 at 4:38pm
I'm surprised that you don't have the crash.
Here are the problematic lines :
 
m_nStepCount = m_nAnimationDuration / m_nAnimationInterval; ( which sets m_nStepCount to 0 ).
 
then later :
 
rc.bottom = rc.top + max( nMinH, m_nSlideStep * m_nExpandedHeight / m_nStepCount );
 
The problem only occurs when unpinning FLOATING panes.
 
Thanks
Jansim


Posted By: Oleg
Date Posted: 18 October 2006 at 1:37am
Hello,
 
Sorry, you right. Fixed.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: jansim
Date Posted: 18 October 2006 at 9:53am

Thanks




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