Abut timers
-
I wanaa to start timer on clicking button Btn_Start and here i will disable button Btn_Start (GetDlgItem(BTN_START ))->EnableWindow (FALSE); SetTimer( 21, 1000 * 60 * 180, NULL); as my calculations 1000 * 60 * 180 = 3 hours or 180 mint is it ? after expiry of 180 minuts in ON_TIMER Event I will Enable Start Button GetDlgItem(BTN_START ))->EnableWindow (TRUE); KillTimer( 21 ); But it not complete its time of 180 mint ,, it enable it early ,,,, Y?? any reason thanx
-
I wanaa to start timer on clicking button Btn_Start and here i will disable button Btn_Start (GetDlgItem(BTN_START ))->EnableWindow (FALSE); SetTimer( 21, 1000 * 60 * 180, NULL); as my calculations 1000 * 60 * 180 = 3 hours or 180 mint is it ? after expiry of 180 minuts in ON_TIMER Event I will Enable Start Button GetDlgItem(BTN_START ))->EnableWindow (TRUE); KillTimer( 21 ); But it not complete its time of 180 mint ,, it enable it early ,,,, Y?? any reason thanx
not sure what you're on about but are you catching the OnTimer event? and making sure you deal with only the correct timer event (21) cheers bryce --- Publitor, making Pubmed easy. http://www.sohocode.com/publitor
-
not sure what you're on about but are you catching the OnTimer event? and making sure you deal with only the correct timer event (21) cheers bryce --- Publitor, making Pubmed easy. http://www.sohocode.com/publitor
Wts is timers life time ,, means i wanaa say its maximum limit to set it.. if i set a timer for 24 hours ,, will work or SetTimer (...) have any time range for timer thanx
-
Wts is timers life time ,, means i wanaa say its maximum limit to set it.. if i set a timer for 24 hours ,, will work or SetTimer (...) have any time range for timer thanx
mate, i have no idea what you're on about you have not provided enough information for anyone to give you any decent answer bryce --- Publitor, making Pubmed easy. http://www.sohocode.com/publitor
-
I wanaa to start timer on clicking button Btn_Start and here i will disable button Btn_Start (GetDlgItem(BTN_START ))->EnableWindow (FALSE); SetTimer( 21, 1000 * 60 * 180, NULL); as my calculations 1000 * 60 * 180 = 3 hours or 180 mint is it ? after expiry of 180 minuts in ON_TIMER Event I will Enable Start Button GetDlgItem(BTN_START ))->EnableWindow (TRUE); KillTimer( 21 ); But it not complete its time of 180 mint ,, it enable it early ,,,, Y?? any reason thanx
-
I wanaa to start timer on clicking button Btn_Start and here i will disable button Btn_Start (GetDlgItem(BTN_START ))->EnableWindow (FALSE); SetTimer( 21, 1000 * 60 * 180, NULL); as my calculations 1000 * 60 * 180 = 3 hours or 180 mint is it ? after expiry of 180 minuts in ON_TIMER Event I will Enable Start Button GetDlgItem(BTN_START ))->EnableWindow (TRUE); KillTimer( 21 ); But it not complete its time of 180 mint ,, it enable it early ,,,, Y?? any reason thanx
You should use the value returned by SetTimer for KillTimer. From MSDN ========= Return Value from SetTimer(...) The timer identifier of the new timer if the function is successful. An application passes this value to the KillTimer member function to kill the timer. Nonzero if successful; otherwise 0.
-
Wts is timers life time ,, means i wanaa say its maximum limit to set it.. if i set a timer for 24 hours ,, will work or SetTimer (...) have any time range for timer thanx
According ot MSDN,Maximum limit is 0x7fffffff or 597 hr. for setting Timer ----------------------------- "I Think It will Work" Formerly Known As "Alok The Programmer" at CP ----------------------------- Alok Gupta visit me at http://www.thisisalok.tk
-
Wts is timers life time ,, means i wanaa say its maximum limit to set it.. if i set a timer for 24 hours ,, will work or SetTimer (...) have any time range for timer thanx
I have no idea what "wts" and "wanaa" mean. If you are looking for the max value for SetTime(...), look at the function prototype.
SetTimer( HWND hWnd , UINT nIDEvent, UINT uElapse, TIMERPROC lpTimerFunc);
It looks like uElapse is of type UNIT, so probably the max number of milliseconds is UINT_MAX. Details on UINT_MAX can be found at msdn.microsoft.com