![]() |
SetAnimationDelay documentation and divide by zero |
Post Reply ![]() |
Author | |
jansim ![]() Groupie ![]() Joined: 03 November 2005 Location: Canada Status: Offline Points: 20 |
![]() ![]() ![]() ![]() ![]() 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
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
jansim ![]() Groupie ![]() Joined: 03 November 2005 Location: Canada Status: Offline Points: 20 |
![]() ![]() ![]() ![]() ![]() |
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
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hello,
Sorry, you right. Fixed.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
jansim ![]() Groupie ![]() Joined: 03 November 2005 Location: Canada Status: Offline Points: 20 |
![]() ![]() ![]() ![]() ![]() |
Thanks |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |