home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / os2 / programm / 4648 < prev    next >
Encoding:
Internet Message Format  |  1992-09-01  |  1.9 KB

  1. Path: sparky!uunet!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewsm!cbnewsk!att-out!rutgers!njitgw.njit.edu!hertz.njit.edu!dic5340
  2. From: dic5340@hertz.njit.edu (David Charlap)
  3. Newsgroups: comp.os.os2.programmer
  4. Subject: Re: Problem with WM_ACTIVATE.
  5. Message-ID: <1992Sep1.225846.23143@njitgw.njit.edu>
  6. Date: 1 Sep 92 22:58:46 GMT
  7. References: <alfred.715353493@dutepp3> <lwjnw_.daveb@netcom.com>
  8. Sender: news@njit.edu
  9. Organization: New Jersey Institute of Technology, Newark, N.J.
  10. Lines: 27
  11. Nntp-Posting-Host: hertz.njit.edu
  12.  
  13. In article <lwjnw_.daveb@netcom.com> daveb@netcom.com (Dave Briccetti) writes:
  14. >Alfred.Kayser@dnpap.et.tudelft.nl (Alfred Kayser) writes:
  15. >: Help, I have a problem with a PM program. When I open a (WinCreateStdWindow)
  16. >: standard window, but which is hidden, and I show it using
  17. >: a WinShowWindow, PM sends me a WM_ACTIVATE message. So far so good,
  18. >: I set the 'active' flag and returns FALSE. So far as is documented, but
  19. >: PM crashes and gives a protection violation. Help I'm lost in PM!!!
  20. >: 
  21. >Perhaps you could run the program under a debugger and find out exactly
  22. >where you are crashing.
  23.  
  24. Not really.  You'll have to remote-debug it.  You can't run a debugger
  25. on the same machine as the PM code you're debugging.  It halts lots of
  26. things. 
  27.  
  28. Better, you should insert fprintf() statements everywhere and log the
  29. program's position to a file and find out what gets written just
  30. before the crash.  Later, you can #ifdef them out, so you can always
  31. set a define to re-compile your code in debug mode.  (I usually use an
  32. #ifdef DEBUG for this)
  33.  
  34.  
  35. -- 
  36.    |)  David Charlap           "TELEPHONE, n.  An Invention of the devil which
  37.   /|_  dic5340@hertz.njit.edu   abrogates some of the advantages of making a
  38.  ((|,)                          disagreeable person keep his distance."
  39.   ~|~                              --- Ambrose Bierce, The Devil's Dictionary
  40.