home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / mswindo / programm / misc / 1505 < prev    next >
Encoding:
Text File  |  1992-08-26  |  1.2 KB  |  38 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc,comp.windows.ms.programmer
  2. Path: sparky!uunet!uunet.ca!hyper.hyper.com!bonneau
  3. From: bonneau@hyper.hyper.com (Paul Bonneau)
  4. Subject: Re: Wierd string/memory problem
  5. Message-ID: <1992Aug26.135327.20039@hyper.hyper.com>
  6. Reply-To: bonneau@hyper.UUCP (Paul Bonneau,,)
  7. Organization: HyperCube Inc.
  8. References: <1992Aug25.000954.28499@u.washington.edu>
  9. Date: Wed, 26 Aug 1992 13:53:27 GMT
  10. Lines: 26
  11.  
  12. In article <1992Aug25.000954.28499@u.washington.edu> goble@hardy.u.washington.edu (Brian Goble) writes:
  13. >I am experiencing a strange problem in my win 3.x app that appears
  14. >to be (maybe) a stack or heap problem (?)
  15. >
  16. >The following two calls to a child window are showing the problem:
  17. >
  18. >
  19. >  1)    SetWindowText(hChildWnd, (LPSTR)"SPEEDS - in MPH");
  20. >
  21. >    This call produces a window caption of: SPEED - in MPH|%losed
  22. >    (where the character '|' is a solid bar)
  23. >
  24. > ------------
  25. >
  26. >  2)    DrawText(hDC, (LPSTR)"Closed", 6, (LPRECT)&Rect, DT_LEFT);
  27. >
  28. >    This call draws the text: %losed
  29. >
  30. [symptom descriptions deleted]
  31.  
  32. Your problem sounds like plain old memory trashing.  The
  33. string is in your data segment.  I would use the debugger and
  34. set a hardware watchpoint on the address of the character
  35. being trashed.
  36.  
  37. cheers - Paul.
  38.