Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - SetAnimationDelay documentation and divide by zero
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SetAnimationDelay documentation and divide by zero

 Post Reply Post Reply
Author
Message
jansim View Drop Down
Groupie
Groupie


Joined: 03 November 2005
Location: Canada
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote jansim Quote  Post ReplyReply Direct Link To This Post Topic: SetAnimationDelay documentation and divide by zero
    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
 
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: 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
Back to Top
jansim View Drop Down
Groupie
Groupie


Joined: 03 November 2005
Location: Canada
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote jansim Quote  Post ReplyReply Direct Link To This Post 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
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: 18 October 2006 at 1:37am
Hello,
 
Sorry, you right. Fixed.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
jansim View Drop Down
Groupie
Groupie


Joined: 03 November 2005
Location: Canada
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote jansim Quote  Post ReplyReply Direct Link To This Post Posted: 18 October 2006 at 9:53am

Thanks

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.031 seconds.