Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!agate!dog.ee.lbl.gov!ux1.lbl.gov!osborn From: osborn@ux1.lbl.gov (James R Osborn) Newsgroups: comp.sys.mac.programmer Subject: Re: Color Quickdraw and RBGBackColor Message-ID: <13427@dog.ee.lbl.gov> Date: 21 May 91 18:45:02 GMT Article-I.D.: dog.13427 References: <1991May20.163218.1@acad3.alaska.edu> <12582@mentor.cc.purdue.edu> Reply-To: osborn@ux1.lbl.gov (James R Osborn) Organization: Lawrence Berkeley Laboratory Lines: 34 X-Local-Date: Tue, 21 May 91 11:45:02 PDT In article <12582@mentor.cc.purdue.edu> ags@seaman.cc.purdue.edu (Dave Seaman) writes: >In article <1991May20.163218.1@acad3.alaska.edu> fxcmh@acad3.alaska.edu writes: >>Easy (I hope) color quickdraw question. I set the RGBBackColor to > > [lots of stuff deleted] > >If you want that one particular window always to have a black background, and >if you are using GetNewCWindow to create it, there is an even easier way. >Create a 'wctb' resource having the same resource ID as your 'WIND' resource, >and set the content color to black in the 'wctb' resource. The window will >come up black as soon as you open it, with no need for any RGBBackColor or >EraseRect calls. > >-- >Dave Seaman >ags@seaman.cc.purdue.edu You can also do a simlar thing as Dave is suggesting with dialogs and alerts. If you have a 'dctb' resource with the same ID as a 'DLOG', then GetNewDialog will open color dialog window (on a color machine) that has the default colors specified in the 'dctb'. A similar situation occurs for 'actb' resources matching 'ALRT' resources when you call Alert (NoteAlert, etc.) on a color machine. The entries in the 'dctb' and 'actb' resource are identical to the 'wctb' format described in IM volume V - Window Manager chapter. -- James .------------------------------.--------------------------------------. | James R. Osborn | It just goes to show you it's always | | Lawrence Berkeley Laboratory | something. Either it's unclear tech | | osborn@ux1.lbl.gov | notes or your mac is smoking. It's | | (415) 548-8464 | always something... | '------------------------------'--------------------------------------'