|
-
Apr 20th, 2001, 11:42 PM
#1
Thread Starter
Frenzied Member
I have a question..does anyone know how to make a timer in C++? Could someone tell me the code, please? thanks! This isnt a windows app...it's dos with a windows message box in it. I am using Dev-C++ and i dont know what compiler. Dev-C++ is a free builder. It's at www.bloodshed.net. So, does anyone have a code for a non-windows app.?
Last edited by SomethinCool; Apr 21st, 2001 at 11:28 PM.
-
Apr 21st, 2001, 03:05 AM
#2
Monday Morning Lunatic
It's quite difficult to make a timer if you're unable to use the Windows service functions like SetTimer and KillTimer. What compiler are you using?
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Apr 21st, 2001, 07:18 AM
#3
Frenzied Member
If you are making windows app.
Code:
#include <windows.h>
const ID_TIME = 15;
SetTimer(hDlg,ID_TIME,1,NULL);
case WM_TIMER:
//code
break;
-
Apr 21st, 2001, 09:31 AM
#4
If you want, you could also have a separate procedure for the timer, by specifying the procedure in the last argument.
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
|