home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ogicse!usenet.coe.montana.edu!decwrl!csus.edu!netcom.com!hill
- From: hill@netcom.com (Tom Hill)
- Newsgroups: comp.os.ms-windows.programmer.misc
- Subject: Re: WndProc comes a crashing down! (Borland C)
- Keywords: windows borland c++ help!!
- Message-ID: <!ydnzhh.hill@netcom.com>
- Date: 28 Aug 92 18:08:25 GMT
- Article-I.D.: netcom.!ydnzhh.hill
- References: <6036@pdxgate.UUCP>
- Organization: Netcom - Online Communication Services (408 241-9760 guest)
- Lines: 34
-
- In article <6036@pdxgate.UUCP> jayward@rigel.cs.pdx.edu (Jay Ward) writes:
- >...
- >No matter what I try my WndProc crashes after processing
- >the WM_CREATE message.
- >...
- >long FAR PASCAL WndProc (HWND hwnd, WORD message, WORD wParam, LONG lParam)
- >{
- > char szBuffer[10], szCurr_dir[MAXDRIVE], szPct_dir[MAXDRIVE];
-
- MAXDRIVE is 3
-
- >HDC hdc;
- >PAINTSTRUCT ps;
- >
- >switch (message)
- > {
- > case WM_CREATE :
- >// hdc = GetDC(hwnd);
- > init(hwnd);
- > ALERT("Done with init()");
- > sprintf(szCurr_dir, "The current directory is: %s", oldpath);
-
- Since the string is longer than three chars, your stack is now corrupt
-
- > sprintf(szPct_dir, "The PCTOOLS directory is: %s", envpath);
-
- Ditto
- >...
- > || Jay Ward || jayward@rigel.cs.pdx.edu ||
- > ||=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-||
- > || Portland State University ||
- > || Portland, Oregon ||
-
- Tom Hill
-