Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!samsung!olivea!oliveb!amdahl!JUTS!duts!rla20 From: rla20@duts.ccc.amdahl.com (Roger Allen) Newsgroups: comp.sys.mac.programmer Subject: Re: COLOR PALETTES Message-ID: Date: 21 May 91 23:06:37 GMT References: <14374.282B3424@fidogate.FIDONET.ORG> Sender: netnews@ccc.amdahl.com Reply-To: rla20@DUTS.ccc.amdahl.com (Roger L. Allen) Organization: Amdahl Corporation, Sunnyvale CA Lines: 23 In article <14374.282B3424@fidogate.FIDONET.ORG> Sheldon.Keala writes: >I am beginning to experiment with custom palettes. My problem is this: how >do I reset everything when my program exits so that the desktop looks right? >I presently reload the default QD color table and reset the palette, but that >is clearly not enough. Thanks, S. Keala. > What has worked for me is to reset the current window's palette to the system palette. Then, do a PaintBehind(yourFrontWindow). The PaintBehind call gets the events all the way down to the desktop and it redraws properly. I hope more programs do this in the future. Nothing is more annoying than exiting a program that fools with the color manager and having the desktop & every other window messed up. BTW, you should also do this when Multifinder swaps you out! Hope this helps, Roger. -- > Roger Allen | :~) "I always lie" < > Amdahl Computer Development | < > rla20@duts.ccc.amdahl.com | ;~( "I'm lying now" <