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