Hi,
I need your help. I just like use SetTimer but
I don't understand what must I include like 3th parameter in SetTimer. I'd like to set timer on in MDI application in Main Frame before opening any views
Thank you in advance!
Drago
Printable View
Hi,
I need your help. I just like use SetTimer but
I don't understand what must I include like 3th parameter in SetTimer. I'd like to set timer on in MDI application in Main Frame before opening any views
Thank you in advance!
Drago
I tend to cheat and use SetTimer like this.
First define a UINT in your class to hold the timer value.
i.e.
class myclass : public CDialog
{
UINT m_nTimer;
....
}
Now somewhere in your code, InitDialog or what ever use:-
m_nTimer = SetTime(1,1000,NULL)
Add a WM_TIMER message using class wizard and poulate it with some code. i.e.
void myclass::OnTimer(UINT nIDEvent)
{
static char buff[80];
// Check to see if event was triggered by your timer.
// i.e. Can start several timers
if(nIDEvent==m_nTimer)
{
// Do your stuff
}
return TRUE;
}
I hope this helps.
Jason.
http://www.netcomuk.co.uk/~jbrooks
Hi.
If you want to use your callback funtion, you can put the function name at the 3rd parameter.
HTH.
-Masaaki Onishi-