Path: utzoo!attcan!uunet!cs.utexas.edu!usc!elroy.jpl.nasa.gov!zardoz.cpd.com!dhw68k!thecloud From: thecloud@dhw68k.cts.com (Ken McLeod) Newsgroups: comp.sys.mac.programmer Subject: Re: Wanted: a window that comes up in black Message-ID: <1990Jul6.232940.14141@dhw68k.cts.com> Date: 6 Jul 90 23:29:40 GMT References: <1115@peyote.cactus.org> <3794@rodan.acs.syr.edu> <23026@dartvax.Dartmouth.EDU> Reply-To: thecloud@dhw68k.cts.com (Ken McLeod) Organization: Wolfskill & Dowling residence; Anaheim, CA (USA) Lines: 32 In article <23026@dartvax.Dartmouth.EDU> anarch@eleazar.dartmouth.edu (The Anarch) writes: > Apologies if this is an elementary question; I'm still pretty new to Mac >programming. Anyway, I'm trying to get a window to come up onscreen with a >black content region. Now I know that I can easily do NewWindow and then >PaintRect the window's body, but that causes a brief white flash, which I'd >like to avoid but have been unable to get rid of. What I *have* tried: >changing the bkColor and bkPat for the window in various ways before a >ShowWindow; I haven't gotten any positive results. When a new window is created, the window manager looks at the low-memory global PaintWhite (a word at $9DC). If it's non-zero, the window's content region is erased to white; otherwise, it isn't. Something like the following has worked for me before... short savedPaintWhite; savedPaintWhite = PaintWhite; PaintWhite = 0; foo = NewWindow(...) PaintWhite = savedPaintWhite; Disclaimer/warning: this code modifies the contents of a low-memory global, and as such is Dangerous (even though IM I-297 condones the clearing of PaintWhite). -ken -- ========== ....... ============================================= Ken McLeod :. .: UUCP: ...{spsd,zardoz,felix}!dhw68k!thecloud ========== :::.. ..::: INTERNET: thecloud@dhw68k.cts.com //// =============================================