New Paste :: Recent Pastes:: Add Line Numbers
. by .,
// 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); }