home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / mswindo / programm / misc / 973 < prev    next >
Encoding:
Text File  |  1992-07-23  |  1.3 KB  |  38 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!mips!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!ux1.cso.uiuc.edu!news.iastate.edu!IASTATE.EDU!elvis
  3. From: elvis@IASTATE.EDU (Todd D Campbell)
  4. Subject: C++: Modeless OWL Messaging (PeekMessage?)
  5. Message-ID: <1992Jul23.101927@IASTATE.EDU>
  6. Sender: news@news.iastate.edu (USENET News System)
  7. Reply-To: elvis@IASTATE.EDU (Todd D Campbell)
  8. Organization: Iowa State University
  9. Date: Thu, 23 Jul 1992 15:19:27 GMT
  10. Lines: 26
  11.  
  12.  
  13. When I throw up a modeless window and begin a loop to do some processing,
  14. I want a 'stop' button to be able to interrupt (like the way the Cancel button
  15. works in Turbo C++ when you compile).  I need a (not-blocking) OWL function to
  16. check the Windows message Queue and handle any messages, as:
  17.  
  18.     if (GetModule ()->MakeWindow (the_window)) {
  19.         for (x = 0; x < 1000; x++)
  20.             do_something ();
  21.             the_window->Defer_To_Windows_Message_Processing ();
  22.         }
  23.     }
  24.  
  25. My Windows reference lists PeekMessage and DispatchMessage as a way to check and
  26. respond to the message q, but when I call them, my TWindow doesn't get drawn
  27. properly.
  28.  
  29. The OWL manual talks about using DefWndProc to handle messages, but I don't know
  30. where to get a TMessage to give to it.  Is there an OWL
  31. equivilent to PeekMessage?
  32.  
  33. Thanks,
  34.  
  35. Todd Campbell
  36. elvis@iastate.edu
  37.  
  38.