🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #3249

NULL_BRUSH Problem

#3249
From: Nick Jurascheck
Date: Fri, 14 Jun 1991 20:59
33 lines
1805 bytes
Has anyone had any experience of using NULL_BRUSH as a window background ? 

i.e.  	wcClassName.hbrBackground = GetStockObject(NULL_BRUSH);
	.
	.
	RegisterClass(&wcClassName);

I've tried this and it seems to work... usually, but not in all cases.
My program sometimes fails to redraw the background as transparent
e.g. when you move any dialog box around, or when you cancel one
particular dialog box. Any part of the box that was in the client area
remains there.  Others work fine on OK or Cancel, unless you move them
first!  Iconising and restoring the window clears the problem.

The background is being invalidated correctly, and my paint proc is
called, because other things _do_ get drawn in these cases. I've even
called InvalidateRect (for the whole window) and UpdateWindow
explicitly after closing the one odd dialog box which doesn't
disappear at all, but with no change.

Incidentally, the program is a hot-spot editor, so it needs to run on
top of another app (graphics or video display package), hence the
need for a transparent background.

Any help on this would be greatly appreciated - please email if possible, 

	Nick Jurascheck

-- 
Nick			
JANET: JurascheckNH@uk.ac.bham.cs  |  UUCP: ...!mcvax!bhamcs!JurascheckNH
BITNET: JurascheckNH%cs.bham.ac.uk@ukacrl.bitnet
INTERNET: JurascheckNH%cs.bham.ac.uk@cunyvm.cuny.edu
Technical Details
Message-ID: <1991Jun14.205944.15227@cs.bham.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!ukc!warwick!nott-cs!bhamcs!nhj

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!ukc!warwick!nott-cs!bhamcs!nhj
From: nhj@cs.bham.ac.uk (Nick Jurascheck)
Newsgroups: comp.windows.ms.programmer
Subject: NULL_BRUSH Problem
Message-ID: <1991Jun14.205944.15227@cs.bham.ac.uk>
Date: 14 Jun 91 20:59:44 GMT
Sender: nhj@cs.bham.ac.uk
Followup-To: nhj@cs.bham.ac.uk
Organization: Birmingham University Computer Science
Lines: 33