home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / os / mswindo / programm / misc / 3359 < prev    next >
Encoding:
Internet Message Format  |  1992-11-10  |  1.5 KB

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