home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / windows / x / 21680 < prev    next >
Encoding:
Internet Message Format  |  1993-01-29  |  1.1 KB

  1. Path: sparky!uunet!olivea!spool.mu.edu!yale.edu!newsserver.jvnc.net!newsserver.technet.sg!nuscc!nusunix2.nus.sg!eng40050
  2. From: eng40050@nusunix1.nus.sg (HENG LI SAN)
  3. Newsgroups: comp.windows.x
  4. Subject: how to check for pushbutton event while looping...
  5. Summary: stopping an video loop by pressing an image
  6. Keywords: multitasking, video loop...
  7. Message-ID: <1993Jan28.083524.8150@nuscc.nus.sg>
  8. Date: 28 Jan 93 08:35:24 GMT
  9. Sender: usenet@nuscc.nus.sg
  10. Organization: National University of Singapore
  11. Lines: 28
  12. X-Newsreader: TIN [version 1.1 PL6]
  13.  
  14. Anybody out there know how can I stop a video loop when I press a
  15. pushbutton.  I have tried to use commands like
  16. XtPending/XPending,XtProcessing etc but somehow, the progress run into
  17. any infinite loop.
  18.  
  19. any comment on my algorithm....
  20.  
  21. while(!Terminated)
  22.     
  23. {
  24.          if i>(no of image) i=0;
  25.     diplay image(i)
  26.     check for pushbutton event
  27.     if pushbutton , handle the event callback
  28.     i++;
  29. }
  30.  
  31.  
  32.  
  33. EventCB{
  34. Terminated = True 
  35. }
  36.  
  37.  
  38. If anybody has done this , or have an idea on how to do this, please
  39. leave me a note.  Thanking in advance.
  40.  
  41. Lisan.
  42.