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