Click here to Skip to main content
15,928,983 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerFound it!!! :-D Pin
JaGGeR1-Oct-01 17:36
JaGGeR1-Oct-01 17:36 
GeneralDeriving classes - Stacked Dialogs: HELP! Pin
Ashman1-Oct-01 14:47
Ashman1-Oct-01 14:47 
GeneralRe: Deriving classes - Stacked Dialogs: HELP! Pin
Michael P Butler1-Oct-01 23:06
Michael P Butler1-Oct-01 23:06 
GeneralRe: Deriving classes - Stacked Dialogs: HELP! Pin
Ashman2-Oct-01 13:28
Ashman2-Oct-01 13:28 
GeneralUsing CTabCtrl... Pin
Mr.Freeze1-Oct-01 14:36
Mr.Freeze1-Oct-01 14:36 
GeneralHElpp Pin
1-Oct-01 12:23
suss1-Oct-01 12:23 
GeneralRe: HElpp Pin
Christian Graus1-Oct-01 13:51
protectorChristian Graus1-Oct-01 13:51 
GeneralOnTimer(UINT nIDEvent) Pin
RobJones1-Oct-01 12:01
RobJones1-Oct-01 12:01 
Hello,
I have a dialog type app and I have 2 timers on the app, one timer displays the current time, and the other is a count down timer.. The problem I am having is that the count down timer is not very accurate.. it looses a few seconds every 10 minutes.. Is there another function other than OnTimer() that I can use that is exact? If so can someone provide me with a little code so I have a idea on how to use it..

Here is a small sample of the OnTimer function I am using.. I doubt there is anything wrong with it...

void CTimerDlg::OnTimer(UINT nIDEvent) 
{
	//Which timer triggered this event?
	switch (nIDEvent)
	{
		//The Current Time?
	case IDC_STATIC_TIMER1:
		//Display the current time
		m_timer1.DisplayCurrentTime();
		break;
		//The Count Down Timer?
	case IDC_STATIC_TIMER2:
		//decrement the count
		iS --;
		//format and display the count
		m_timer2.Display(iS,iM,iH,iD,(CString)m_strTimer2="%D:%H:%M:%S");
		break;
	}
	CBitmapDialog::OnTimer(nIDEvent);


Thanks,
Rob
GeneralRe: OnTimer(UINT nIDEvent) Pin
Paolo Messina1-Oct-01 12:23
professionalPaolo Messina1-Oct-01 12:23 
GeneralRe: OnTimer(UINT nIDEvent) Pin
Nemanja Trifunovic1-Oct-01 12:24
Nemanja Trifunovic1-Oct-01 12:24 
GeneralRe: OnTimer(UINT nIDEvent) Pin
RobJones1-Oct-01 12:52
RobJones1-Oct-01 12:52 
Generalvideo into C++/MFC Pin
john john mackey1-Oct-01 10:08
john john mackey1-Oct-01 10:08 
GeneralRe: video into C++/MFC Pin
Christian Graus1-Oct-01 10:47
protectorChristian Graus1-Oct-01 10:47 
GeneralRe: video into C++/MFC Pin
2-Nov-01 2:56
suss2-Nov-01 2:56 
GeneralRandom numbers Pin
1-Oct-01 9:23
suss1-Oct-01 9:23 
GeneralRe: Random numbers Pin
Mike Nordell1-Oct-01 9:38
Mike Nordell1-Oct-01 9:38 
GeneralRe: Random numbers Pin
1-Oct-01 9:59
suss1-Oct-01 9:59 
GeneralI ve run out of ideas Pin
1-Oct-01 9:12
suss1-Oct-01 9:12 
GeneralRe: I ve run out of ideas Pin
Mike Nordell1-Oct-01 9:46
Mike Nordell1-Oct-01 9:46 
GeneralRe: I ve run out of ideas Pin
Joaquín M López Muñoz1-Oct-01 9:51
Joaquín M López Muñoz1-Oct-01 9:51 
GeneralRe: I ve run out of ideas Pin
1-Oct-01 12:54
suss1-Oct-01 12:54 
GeneralSMTP Commands (Read Receipts) Pin
Bret Faller1-Oct-01 9:03
Bret Faller1-Oct-01 9:03 
GeneralRe: SMTP Commands (Read Receipts) Pin
Mike Nordell1-Oct-01 9:49
Mike Nordell1-Oct-01 9:49 
GeneralRe: SMTP Commands (Read Receipts) Pin
Bret Faller2-Oct-01 13:11
Bret Faller2-Oct-01 13:11 
GeneralA question about thread programming Pin
Chaos Lawful1-Oct-01 8:17
Chaos Lawful1-Oct-01 8:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.