Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!caen!zaphod.mps.ohio-state.edu!sample.eng.ohio-state.edu!purdue!mentor.cc.purdue.edu!seaman.cc.purdue.edu!ags From: ags@seaman.cc.purdue.edu (Dave Seaman) Newsgroups: comp.sys.mac.programmer Subject: Re: Color Quickdraw and RBGBackColor Message-ID: <12582@mentor.cc.purdue.edu> Date: 21 May 91 18:02:55 GMT References: <1991May20.163218.1@acad3.alaska.edu> Sender: news@mentor.cc.purdue.edu Reply-To: ags@seaman.cc.purdue.edu (Dave Seaman) Organization: Purdue University Lines: 30 In article <1991May20.163218.1@acad3.alaska.edu> fxcmh@acad3.alaska.edu writes: >Easy (I hope) color quickdraw question. I set the RGBBackColor to >anything besides white, and do some EraseRect calls, among other >things. Then, within the application, everything works fine. I >change the RGBBBackColor (sp?) back to white, and everything still >works fine, until the application quits. Then, unfortunately, things >quit working. The background color for a lot of the windows from >other applications turns black. For instance, the buttons in any >dialog box that comes up after I quit my application are entirely >black. This makes it tough to read them! Anyway, the question is, >what am I doing wrong? I am sure it is the RGBBackColor call, because >if I change them all to RGBForeColor and change the EraseRect to >FillRect, everything works fine. I am not willing to leave it like >this because what I am doing is really the background of the window. Are you doing the proper SetPort before calling RGBBackColor? From your description, it sounds as if you have set your desktop background color to black, instead of the window background color. You wouldn't notice the difference until an update occurs outside the window. 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