Hi,
for one of my programs I use a toolbar with buttons behaving like
checkboxes. They are used for a view which displays an animations
calculated on-the-fly. Problem is: Sometimes the buttons do no longer
behave as defined in my CmdUI-handler but like 'normal' checkbuttons (on
click down, next click up). It seems, that this does happen when the
displayed view gets too complex. (On a faster computer this problem does
not occur) Is this possible? If yes: How can I
ensure, that these buttons behave the way I defined? I don't care if
this would cause the view not to be updated for a moment.
Regards,
Oliver
P.S.: The code for my button-handlers and their CmdUI-handlers:

void CMainFrame::OnPlay()
{
if ( m_bPlay ) return ;
/*call documents play function*/
m_bPlay = true;
m_bPause = false;
}

void CMainFrame::OnStepplay()
{
if ( m_bPlay ) return ;
/*call documents step-play function*/
}

void CMainFrame::OnStop()
{
/*call documents stop function*/
m_bPlay = false;
m_bPause = false;
}

void CMainFrame::OnPause()
{
if ( !m_bPlay ) return ;
/*call documents pause function*/
m_bPlay = false;
m_bPause = true;
}

void CMainFrame::OnUpdatePause(CCmdUI* pCmdUI)
{
pCmdUI->SetCheck(!m_bPlay && m_bPause);
}

void CMainFrame::OnUpdatePlay(CCmdUI* pCmdUI)
{
pCmdUI->SetCheck(m_bPlay && !m_bPause);
}

void CMainFrame::OnUpdateStepplay(CCmdUI* pCmdUI)
{
pCmdUI->Enable(!m_bPlay);
}

void CMainFrame::OnUpdateStop(CCmdUI* pCmdUI)
{
pCmdUI->SetCheck(!m_bPlay && !m_bPause);
}

--
visit http://www.oliver-gerlach.net
if you do not know what else to do
This document has been created with
mozilla (http://www.mozilla.org)