🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: PeekMessage and WM_PAINT messages

#2867
From: Barry Press
Date: Mon, 27 May 1991 17:53
18 lines
1498 bytes
In article <1991May26.084935.14400@usenet.ins.cwru.edu> trier@po.CWRU.Edu writes:
>I'm a little confused by the "Comments" section of the PeekMessage entry
>in the SDK Reference Volume 1, page 4-330.  It states, "PeekMessage does
>not remove WM_PAINT messages from the queue.  The messages remain in the
>queue until processed."  Does "processed" refer to the BeginPaint function,
>or is there something else I need to do when using PeekMessage?

This is by now a legendary red herring, and should be bronzed, if not
in the FAQ.  What it says is literally true -- PeekMessage does not remove
WM_PAINT from the queue.

What it doesn't say is that GetMessage doesn't either.  What you followed with
is exactly correct -- regardless of how you get your hands on the WM_PAINT,
it remains in the queue until the BeginPaint/EndPaint or until you do
a ValidateRect of the invalid area.

-- 
Barry Press                                 Internet: press@venice.sedd.trw.com
Technical Details
Message-ID: <1110@venice.SEDD.TRW.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!trwind!venice!press
References: <1991May26.084935.14400@usenet.ins.cwru.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!trwind!venice!press
From: press@venice.SEDD.TRW.COM (Barry Press)
Newsgroups: comp.windows.ms.programmer
Subject: Re: PeekMessage and WM_PAINT messages
Keywords: PeekMessage WM_PAINT
Message-ID: <1110@venice.SEDD.TRW.COM>
Date: 27 May 91 17:53:48 GMT
References: <1991May26.084935.14400@usenet.ins.cwru.edu>
Reply-To: press@venice.sedd.trw.com (Barry Press)
Organization: TRW Systems Engineering & Development Division, Redondo Beach, CA
Lines: 18