home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / os2 / programm / 4254 < prev    next >
Encoding:
Internet Message Format  |  1992-08-17  |  1.4 KB

  1. Path: sparky!uunet!vnet.ibm.com
  2. From: peterf@vnet.ibm.com (Peter Forsberg)
  3. Message-ID: <19920817.032743.575@almaden.ibm.com>
  4. Date: Mon, 17 Aug 92 12:17:12 SWE
  5. Newsgroups: comp.os.os2.programmer
  6. Subject: Re: Threads & PM
  7. Reply-To: peterf@vnet.ibm.com
  8. Organization: IBM Corporation
  9. Disclaimer: This posting represents the poster's views, not those of IBM
  10. News-Software: UReply 3.0
  11. References: <1992Aug17.094307.24775@wsl.ie>
  12. Lines: 26
  13.  
  14. In <1992Aug17.094307.24775@wsl.ie> John J. Allen writes:
  15. >I'm having a problem with a PM app that I can't figure out.
  16. >
  17. >I'm using a thread to collect Disk Usage Info and appending it to a
  18. >listbox in the dialog box but all the calls fail. If I call the
  19. >function normally it all works fine.
  20. >
  21. >So the question is how can you update a dialog box from a thread.
  22. >
  23. >Thanks.
  24. >
  25.  
  26. How do you append the info to the listbox ?  Do you use WinSendMsg or
  27. WinPostMsg to send the LM_INSERTITEM message to the listbox ? (I assume
  28. you do either that, or you send some WM_USER message to the dialog
  29. box window - the same rule (below) applies in that case).
  30. From a secondary thread without a PM input queue, you must use WinPostMsg.
  31. WinSendMsg cannot be called from such a thread.
  32.  
  33. Hope this helps,
  34.  
  35. Peter
  36. --
  37. Peter Forsberg           E-mail:  peterf@vnet.ibm.com          (primary)
  38.                                   d88-pfo@nada.kth.se        (alternate)
  39. Disclaimer: This posting represents the poster's views, not those of IBM
  40.