Article View: comp.windows.ms.programmer
Article #2930Re: PeekMessage and WM_PAINT messages
From: Barry Press
Date: Mon, 27 May 1991 22:53
Date: Mon, 27 May 1991 22:53
22 lines
1515 bytes
1515 bytes
Reply-To: press@venice.sedd.trw.com (Barry Press) 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 * Origin: Seaeast - Fidonet<->Usenet Gateway - sunbrk (1:343/15.0)
Technical Details
Message-ID:
<675518012.0@sunbrk.FidoNet>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!uunet!zephyr.ens.tek.com!uw-beaver!milton!sumax!polari!rwing!seaeast!sunbrk!UsenetShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!uunet!zephyr.ens.tek.com!uw-beaver!milton!sumax!polari!rwing!seaeast!sunbrk!Usenet From: Barry.Press@sunbrk.FidoNet.Org (Barry Press) Newsgroups: comp.windows.ms.programmer Subject: Re: PeekMessage and WM_PAINT messages Message-ID: <675518012.0@sunbrk.FidoNet> Date: 27 May 91 22:53:48 GMT Sender: Usenet@sunbrk.FidoNet.Org Lines: 22