Click here to Skip to main content
15,915,501 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralError when firing SetTimer in a Modeless Dlg Pin
RobJones5-Sep-01 12:36
RobJones5-Sep-01 12:36 
GeneralRe: Error when firing SetTimer in a Modeless Dlg Pin
Steen Krogsgaard5-Sep-01 21:56
Steen Krogsgaard5-Sep-01 21:56 
GeneralRe: Error when firing SetTimer in a Modeless Dlg Pin
RobJones6-Sep-01 6:20
RobJones6-Sep-01 6:20 
GeneralRe: Error when firing SetTimer in a Modeless Dlg Pin
<k>Andreas Hoheisel6-Sep-01 8:48
<k>Andreas Hoheisel6-Sep-01 8:48 
GeneralRe: Error when firing SetTimer in a Modeless Dlg Pin
RobJones6-Sep-01 9:19
RobJones6-Sep-01 9:19 
GeneralRe: Error when firing SetTimer in a Modeless Dlg Pin
Steen Krogsgaard6-Sep-01 22:17
Steen Krogsgaard6-Sep-01 22:17 
GeneralRe: Error when firing SetTimer in a Modeless Dlg Pin
A.R.6-Sep-01 11:30
A.R.6-Sep-01 11:30 
GeneralRe: Error when firing SetTimer in a Modeless Dlg Pin
RobJones6-Sep-01 11:51
RobJones6-Sep-01 11:51 
Sure...

<br />
void CAdd1Dlg::OnTimer(UINT nIDEvent) <br />
{<br />
	switch (nIDEvent)<br />
	{<br />
	case IDC_S_TIMER1:<br />
		//decrement the count<br />
		iS --;<br />
		//format and display the count<br />
		m_ctlTime1.Display(iS,iM,iH,iD,(CString)m_strTime1="%D:%H:%M:%S");<br />
		break;<br />
	}<br />
	<br />
	UpdateData(FALSE);<br />
	<br />
	CAdd1Dlg::OnTimer(nIDEvent);<br />


<br />
<br />
void OnTimerStart();<br />
if(something.....)<br />
{<br />
}<br />
else<br />
	{<br />
		UpdateData(TRUE);<br />
		<br />
		//Start the timer<br />
		iTa = iDa*24*60*60+iHa*60*60+iMa*60+iSa;<br />
		iTPDT = iPDTD*24*60*60+iPDTH*60*60+iPDTM*60+iPDTS;<br />
		iDiff = iTa-iTPDT;<br />
		iS = iDiff;<br />
<br />
		strTime.Format("%d",iS);<br />
		<br />
		SetTimer(IDC_S_TIMER1,1000,NULL);<br />
		<br />
		//Disable Start Button and enable stop<br />
		m_bStopTime1.EnableWindow(TRUE);<br />
		m_bStartTime1.EnableWindow(FALSE);<br />
		m_bGrab1.EnableWindow(FALSE);<br />
		GetDlgItem(IDC_E_MIN1)->EnableWindow(FALSE);<br />
		GetDlgItem(IDC_E_SEC1)->EnableWindow(FALSE);<br />
		GetDlgItem(IDC_E_QUANTITY)->EnableWindow(FALSE);<br />
		GetDlgItem(IDC_E_MAXBID)->EnableWindow(FALSE);<br />
		GetDlgItem(IDC_E_ITEM)->EnableWindow(FALSE);<br />
		<br />
		fileEditText.Remove(_T("Timestart.txt"));<br />
		fileEditText.Remove(_T("TimeUrlstart.txt"));<br />
		UpdateData(FALSE);<br />
	}	<br />


I can only find one section that I do a SetTimer()... The reason I use switch in nIDEvent is because I use to have 2 timere that i would switch between.. I only have 1 now.. I tried to remove the switch and I still get the same error..

Thanks for the help!!!

Rob
GeneralRe: Error when firing SetTimer in a Modeless Dlg Pin
A.R.6-Sep-01 14:40
A.R.6-Sep-01 14:40 
GeneralRe: Error when firing SetTimer in a Modeless Dlg Pin
6-Sep-01 15:13
suss6-Sep-01 15:13 
GeneralRe: Error when firing SetTimer in a Modeless Dlg Pin
Steen Krogsgaard6-Sep-01 21:11
Steen Krogsgaard6-Sep-01 21:11 
QuestionWhat happened? :(( Pin
Cathy5-Sep-01 12:17
Cathy5-Sep-01 12:17 
AnswerRe: What happened? :(( Pin
Christian Graus5-Sep-01 13:38
protectorChristian Graus5-Sep-01 13:38 
GeneralRe: What happened? :(( Pin
Cathy6-Sep-01 6:27
Cathy6-Sep-01 6:27 
GeneralRe: What happened? :(( Pin
Christian Graus6-Sep-01 12:10
protectorChristian Graus6-Sep-01 12:10 
Generalcapturing OutputDebugStrings Pin
Steve The Plant5-Sep-01 11:02
Steve The Plant5-Sep-01 11:02 
GeneralRe: capturing OutputDebugStrings Pin
Tomasz Sowinski6-Sep-01 1:57
Tomasz Sowinski6-Sep-01 1:57 
GeneralRe: capturing OutputDebugStrings Pin
reiko6-Sep-01 18:39
reiko6-Sep-01 18:39 
GeneralRe: capturing OutputDebugStrings Pin
Mike Nordell7-Sep-01 10:59
Mike Nordell7-Sep-01 10:59 
QuestionHow to display image in View? Pin
Jerry Wang5-Sep-01 9:18
Jerry Wang5-Sep-01 9:18 
AnswerRe: How to display image in View? Pin
Chris Losinger5-Sep-01 10:32
professionalChris Losinger5-Sep-01 10:32 
AnswerRe: How to display image in View? Pin
Not Active5-Sep-01 10:42
mentorNot Active5-Sep-01 10:42 
GeneralBSTR parameter to Stored Procedure Pin
Bigge5-Sep-01 8:46
Bigge5-Sep-01 8:46 
GeneralRe: BSTR parameter to Stored Procedure Pin
Not Active5-Sep-01 10:26
mentorNot Active5-Sep-01 10:26 
GeneralRe: BSTR parameter to Stored Procedure Pin
Rashid Thadha5-Sep-01 11:52
Rashid Thadha5-Sep-01 11:52 

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.