home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / mswindo / programm / misc / 1562 < prev    next >
Encoding:
Internet Message Format  |  1992-08-29  |  1.4 KB

  1. Path: sparky!uunet!ogicse!usenet.coe.montana.edu!decwrl!csus.edu!netcom.com!hill
  2. From: hill@netcom.com (Tom Hill)
  3. Newsgroups: comp.os.ms-windows.programmer.misc
  4. Subject: Re: WndProc comes a crashing down! (Borland C)
  5. Keywords: windows borland c++ help!!
  6. Message-ID: <!ydnzhh.hill@netcom.com>
  7. Date: 28 Aug 92 18:08:25 GMT
  8. Article-I.D.: netcom.!ydnzhh.hill
  9. References: <6036@pdxgate.UUCP>
  10. Organization: Netcom - Online Communication Services  (408 241-9760 guest)
  11. Lines: 34
  12.  
  13. In article <6036@pdxgate.UUCP> jayward@rigel.cs.pdx.edu (Jay Ward) writes:
  14. >...
  15. >No matter what I try my WndProc crashes after processing
  16. >the WM_CREATE message.
  17. >...
  18. >long FAR PASCAL WndProc (HWND hwnd, WORD message, WORD wParam, LONG lParam)
  19. >{
  20. > char szBuffer[10], szCurr_dir[MAXDRIVE], szPct_dir[MAXDRIVE];
  21.  
  22. MAXDRIVE is 3
  23.  
  24. >HDC                hdc;
  25. >PAINTSTRUCT        ps;
  26. >
  27. >switch (message)
  28. >    {
  29. >    case WM_CREATE :
  30. >//        hdc = GetDC(hwnd);
  31. >        init(hwnd);
  32. >        ALERT("Done with init()");
  33. >        sprintf(szCurr_dir, "The current directory is: %s", oldpath);
  34.  
  35. Since the string is longer than three chars, your stack is now corrupt
  36.  
  37. >               sprintf(szPct_dir, "The PCTOOLS directory is: %s", envpath);
  38.  
  39. Ditto
  40. >...
  41. >          ||  Jay Ward || jayward@rigel.cs.pdx.edu  || 
  42. >          ||=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-||
  43. >          ||        Portland State University       ||
  44. >          ||            Portland, Oregon            ||
  45.  
  46. Tom Hill
  47.