home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!mcsun!sunic!kth.se!dront.nada.kth.se!d88-jwa
- From: d88-jwa@dront.nada.kth.se (Jon W{tte)
- Subject: Re: HELP: how can I ...
- In-Reply-To: cchen@silver.ucs.indiana.edu's message of Fri, 21 Aug 1992 10:48:25 GMT
- Message-ID: <D88-JWA.92Aug21175725@dront.nada.kth.se>
- Originator: d88-jwa@dront.nada.kth.se
- Sender: usenet@kth.se (Usenet)
- Nntp-Posting-Host: dront.nada.kth.se
- Organization: Royal Institute of Technology, Stockholm, Sweden
- References: <BtBy0p.7Gt@usenet.ucs.indiana.edu>
- Date: Fri, 21 Aug 1992 16:57:25 GMT
- Lines: 42
-
- > cchen@silver.ucs.indiana.edu writes:
-
- I am new to this THINK C programming stuff and I have two questions
- that might be obvious to some of you seasoned MAC programmers:
-
- 1. How can I find out what kind of video card is installed through my
- program?
-
- "What kind" !? What if there are several video cards? No card?
- Internal video? Multiple screens?
-
- Maybe you mean what kinds of bit depths the attached screens
- have? Look in Inside Mac VI; it has a fairly good explanation.
- IM V also goes on about the same info. Beware; the user may
- change bit-depth at any time; if you write directly to screen,
- be sure to take that into account.
-
- If you want to simply list "Card XXX installed" try:
- 1) If color QD is not available, it's internal to the machine.
- 2) If color QD _is_ available, loop through all screens/devices,
- and check the slot info there, then query the slot.
-
- 2. How can an application getthe document name/path through which the
- application is invoked?
-
- I posted on this yesterday...
-
- Immediately after startup:
-
- short refNum = CurResFile ( ) ;
- PBHGetFCBInfo ( .... using refNum .... ) ;
-
- This will give you the name, the vRefNum and dirID to the
- current resource file, which happens to be the application
- at startup. Use HOpenDF to open the applications data fork
- using this info.
-
- --
- - I have decided that it is not boxes but my lack of skill that's the problem.
- - Traitor! This kind of attitude will get you nowhere around here. If you must
- know, it's not your boxes that are the problem, it's your lack of a
- sufficient number of boxes. Go out and buy something.
-