Article ID: 152074 - Last Review: November 21, 2006 - Revision: 2.1 PRB: COleMessageFilter Doesn't Process WM_PAINTThis article was previously published under Q152074 On This PageSYMPTOMS
If an automation client calls a method of an automation server that brings
up a modal dialog, the client area below the dialog may not re-paint itself
if the dialog is moved over it.
CAUSE
The painting problem occurs because the WM_PAINT messages are in the queue,
but are not dispatched.
RESOLUTION
One solution is to retrieve and dispatch all WM_PAINT messages when
IMessageFilter::MessagePending is called. The sample code below
demonstrates one way for this resolution to be implemented.
MORE INFORMATION
To fix the problem with MFC, create a new class that overrides
COleMessageFilter::OnMessagePending() as described below. Then revoke the
old message filter and register this new one.
Sample CodeAPPLIES TO
| Article Translations
|

Back to the top
