🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms
Article #1960

Re: Sending WM_PAINT to all windows

#1960
From: Bill Turner
Date: Mon, 06 Nov 1989 17:49
16 lines
1216 bytes
> Hi, I am trying to use EnumWindows s.t. I can send a WM_PAINT message to
> each window, this doesn't seem to work, since none of the windows
> get repainted.

Well, you can't really just send a WM_PAINT message to a window to get it to
repaint itself.  The WM_PAINT is a side-effect of some other things that need
to be done for painting.

What I'd suggest is calling InvalidateRect to force a repaint of the window.
If you specify that the entire window needs to redisplay, then *everything*
gets redisplayed.  [If you have windows that need partial repainting (i.e.
part of the window is already invalid) and you want only that part to 
repaint, then UpdateWindow will force any pending redisplay to be done.]

--Bill Turner (bturner@hp-pcd.hp.com)
HP Corvallis Information Systems
Technical Details
Message-ID: <106580070@hpcvlx.cv.hp.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!samsung!usc!ucsd!ucbvax!hplabs!hp-pcd!hpcvlx!bturner
References: <32382@ucbvax.BERKELEY.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!samsung!usc!ucsd!ucbvax!hplabs!hp-pcd!hpcvlx!bturner
From: bturner@hpcvlx.cv.hp.com (Bill Turner)
Newsgroups: comp.windows.ms
Subject: Re: Sending WM_PAINT to all windows
Message-ID: <106580070@hpcvlx.cv.hp.com>
Date: 6 Nov 89 17:49:00 GMT
References: <32382@ucbvax.BERKELEY.EDU>
Organization: Hewlett-Packard Co., Corvallis, OR, USA
Lines: 16