GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


New Paste :: Recent Pastes:: No Line Numbers


. by .,
1
 
// in OnInitDialog

// TODO: Add extra initialization here
m_CancelButton.EnableWindow(FALSE);
SetTimer( 1, 1000, 0 );
SetDlgItemText( IDC_STATUSBAR, "5 Seconds Left..." );
    



void CstupidDlg::OnTimer(UINT nIDEvent)
{
    // TODO: Add your message handler code here and/or call default
    CString timer;
    if( m_WaitTicks ) {
        timer.Format( "%d Seconds Left...", m_WaitTicks );
        SetDlgItemText( IDC_STATUSBAR, timer );
        m_WaitTicks--;
    }
    else {
        m_CancelButton.EnableWindow( TRUE );
        SetDlgItemText( IDC_STATUSBAR, "Time Up!");
        KillTimer( 1 );
    }
    CDialog::OnTimer(nIDEvent);
}