|
-
Feb 8th, 2001, 12:41 PM
#1
Thread Starter
Frenzied Member
I am having a problem killing a timer I have set
I set the timer with:
Code:
m_TimerID = SetTimer(m_hWnd,1,5000,(TIMERPROC)TimerProc);
And I have tried both of the following to kill the timer
Code:
BOOL ret;
ret = KillTimer(m_hWnd,1);
ret = KillTimer(m_hWnd,m_TimerID);
Neither one seems to kill the timer, and the both return false. Any ideas on what I am doing wrong or how to kill the timer?
Thanks
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

-
Feb 8th, 2001, 02:38 PM
#2
Frenzied Member
According to MS this should work:
Code:
ret = KillTimer(NULL, m_TimerID);
Where m_TimerID is the Timer ID you received from the SetTimer function
Or
Code:
ret = KillTimer(m_hWnd,1);
Where 1 is the Timer ID (I see you use 1 in the SetTimer too)
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Feb 8th, 2001, 04:07 PM
#3
Thread Starter
Frenzied Member
I figured it out. My window handle was no inited yet so it was 0x00000000 in the SetTimer function and 0x0000da16 in the KillTimer. So I just set the kill and set to the same handle and it works now. Thanks for the help.
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|