home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / mac / programm / 14028 < prev    next >
Encoding:
Text File  |  1992-08-14  |  1.9 KB  |  42 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!jvnc.net!princeton!phoenix.Princeton.EDU!zimerman
  3. From: zimerman@phoenix.Princeton.EDU (Jacob Ben-david Zimmerman)
  4. Subject: How do I save a window location between uses of the app?
  5. Message-ID: <1992Aug14.212551.14722@Princeton.EDU>
  6. Originator: news@nimaster
  7. Sender: news@Princeton.EDU (USENET News System)
  8. Nntp-Posting-Host: phoenix.princeton.edu
  9. Organization: Princeton University
  10. Distribution: usa
  11. Date: Fri, 14 Aug 1992 21:25:51 GMT
  12. Lines: 28
  13.  
  14. Hi all!  I'm trying (still :-)) to teach myself Mac GUI programming
  15. using C. (actually I'm learning C concurrently, but...) In any case, in
  16. one of my little educational projects, I've run up against a question.
  17. Suppose I have a window that I can move around the screen freely.  Now
  18. suppose that I want to save the lcoation of the window at the time of
  19. exiting the app so that the next time the app is launched, it comes up
  20. where it was.  How would I do that?  Let me tell you what I tried, and
  21. it didn't appear to work...I tried getting a handle to the window using
  22. RecoverHandle( <the windowptr> ) and then using that handle to call
  23. CHangedResource and WriteResource, after first making sure that the
  24. resource file was set to my app's file ref num.  BUt nothing happens.
  25. Is this because whatever is pointed to by a WindowPtr is not the same as
  26. what's stored in the resource file?   If that's the case, what should I
  27. do?  Thanks for any help!
  28.  
  29. -JBZimmerman!
  30. p.s. please respond by email as I can't possibly keep up with all the
  31. groups I really *should* read, much less those that I *want* to read.
  32. :-)  Thanks!
  33.  
  34. -JZ
  35.  
  36.  
  37. -- 
  38. ___________           |-Is that Scotch over there?  Hold everything.
  39.      ||               |                -Sean Connery, The Russia House
  40. ||   ||acob Zimmerman!+> <zimerman@phoenix.Princeton.EDU> INTERNET 
  41.  \===/                |  <zimerman@PUCC>                  BITNET
  42.