home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / mac / programm / 20194 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  1.1 KB

  1. Path: sparky!uunet!elroy.jpl.nasa.gov!nntp-server.caltech.edu!chriswd
  2. From: chriswd@cco.caltech.edu (Chris Michael Ward)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Resource help?
  5. Date: 22 Dec 1992 16:58:45 GMT
  6. Organization: California Institute of Technology, Pasadena
  7. Lines: 21
  8. Message-ID: <1h7hg5INNhmr@gap.caltech.edu>
  9. NNTP-Posting-Host: punisher.caltech.edu
  10. Summary: I need some help with resources...
  11.  
  12. I was wondering if someone could help me out.  As a newtimer to Macintosh
  13. programming, I am in the process of learning how to use resources.  I'm
  14. trying to get the data from a simple 'STR#' resource, but it doesn't
  15. seem to be working correctly.  
  16.  
  17. Should I do something like this:?
  18.  
  19. aHandle = GetResource ('STR#', RES_ID);
  20. the_string = (char *) aHandle;
  21. strncpy (temp_string, the_string, 2);
  22. num_words = (int) temp_string;
  23. ... then proceed to get the character data as the_string[x]?
  24.  
  25. I'm sure I'm probably approaching this problem incorrectly.  Any advice
  26. would be greatly appreciated.  (I can't seem to find any more info in
  27. Inside Macintosh)
  28.  
  29. Thank you greatly!
  30.  
  31. - Chris
  32.  
  33.