home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ukma!usenet.ins.cwru.edu!cleveland.Freenet.Edu!ae302
- From: ae302@cleveland.Freenet.Edu (Peter Haller)
- Newsgroups: comp.os.ms-windows.programmer.misc
- Subject: Re: Using the Windows 3.1 Timer
- Date: 11 Nov 1992 02:52:17 GMT
- Organization: Case Western Reserve University, Cleveland, OH (USA)
- Lines: 24
- Message-ID: <1dpsh1INNb0r@usenet.INS.CWRU.Edu>
- References: <1992Nov10.095014.6998@aisb.ed.ac.uk>
- Reply-To: ae302@cleveland.Freenet.Edu (Peter Haller)
- NNTP-Posting-Host: slc12.ins.cwru.edu
-
-
- In a previous article, steve@cstr.ed.ac.uk (Steve Hiller) says:
-
- >I have a Windows 3.1 program which conducts a test with the user.
- >After the user answers a question, the system prints out CORRECT or
- >INCORRECT and then pauses for a couple of secs before going onto the
- >next question. I want my program to accept no input during the pause.
- >The only way I have found to do this thus far is to use the function
- >difftime() in a loop waiting for the correct time difference. Is there
- >a so-called proper way of doing this in Windows?
- >
- >Thanks.
- >
- Use the WM_TIMER message with a timer set for the time that
- you wish to wait. Then prior to starting the timer, set a global
- or static var with the number of the next question to ask.
- A state machine of sorts.
-
- PCH
- --
- Peter C. Haller | 'If you do what you
- Lorain Products | have always done,
- ae302@cleveland.Freenet.Edu | expect what you have
- "Are we having fun yet?" | always received.'
-