Click here to Skip to main content
15,947,472 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I cannot start timer in ActiveX control (built in MFC : Visual C++ 6.0). I tried to start it by following code:
C++
::SetTimer(*this,IDT_TIMER1,2000,NULL);

This code also does not work:
C++
::SetTimer(NULL,IDT_TIMER1,2000,NULL);

These functions do not return zero, yet WM_TIMER is not called after 2 seconds. I tested that my placing AfxMessageBox() in WM_TIMER.
Help me solve my problem.
Posted
Updated 20-Oct-10 21:32pm
v4

1 solution

::SetTimer(m_hWnd, IDT_TIMER1, 2000, NULL);
or
SetTimer(IDT_TIMER1, 2000, NULL);
 
Share this answer
 
Comments
Shah Rukh Qasim 21-Oct-10 9:34am    
Both do not work.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900