home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / mac / programm / 21926 < prev    next >
Encoding:
Internet Message Format  |  1993-01-21  |  1.2 KB

  1. Path: sparky!uunet!olivea!sgigate!sgiblab!cs.uoregon.edu!sisters.cs.uoregon.edu!jnewman
  2. From: jnewman@sisters.cs.uoregon.edu (Jonathan Grady Newman)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Lack of color solved, but why?
  5. Summary: Var declaration caused lack of colors in Menu
  6. Keywords: color, memory
  7. Message-ID: <1993Jan22.034114.4307@cs.uoregon.edu>
  8. Date: 22 Jan 93 03:41:14 GMT
  9. Sender: news@cs.uoregon.edu (Netnews Owner)
  10. Organization: University of Oregon Computer and Information Sciences Dept.
  11. Lines: 24
  12.  
  13. In an application I have been writing in Think C, I had a problem with all
  14. of the text in windows, menus and dialog boxes being missing. The cause
  15. of the problem seems to be the following declaration in my main:
  16.  
  17. RGBColor screen[screenheight+1][screenwidth+1];
  18.  
  19. Where screenheight and screenwidth are previously #define'd.
  20.  
  21. The fix was to make the following declaration instead:
  22.  
  23. RGBColor *screen;
  24.  
  25. And make a call to NewPtr...
  26.  
  27. My question is why does this happen?  Is it a problem with TC?
  28. I am using objects in my app.
  29.  
  30.  
  31.  
  32. -- 
  33. ========================================================
  34. Jonathan Newman                "Lick cheese" - jnewman
  35. University Of Oregon
  36. Computer and Information Science
  37.