Re: Displaying Text
- From: "David Ching" <dc@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 7 Jul 2007 08:21:46 -0700
"Scott McPhillips [MVP]" <org-dot-mvps-at-scottmcp> wrote in message
news:pMidnTh4DdU6DxLbnZ2dnUVZ_oesnZ2d@xxxxxxxxxxxxxx
The reason for the flickering is that the WM_ERASEBKGND message is sent
just prior to WM_PAINT. The default MFC message handler makes the window
all white in WM_ERASEBKGND, and this is briefly visible.
When you use a memory DC you suppress the MFC erase by overriding
WM_ERASEBKGND and doing nothing, then you combine the erase and text paint
into a single visual change.
It's always bothered me that when I resize my main window, all the controls
within it flicker, including the toolbar and view areas. I believe there's
some sort of CS_ style that could stop this, something like CS_CLIPCHILDREN,
or even overriding CMainFrame::OnEraseBackground() to do nothing, as you
say. Do you know of any way of stopping this? I just haven't had time to
research it.
Thanks,
David
.
- Follow-Ups:
- Re: Displaying Text
- From: David Webber
- Re: Displaying Text
- References:
- Displaying Text
- From: katz911
- Re: Displaying Text
- From: David Ching
- Re: Displaying Text
- From: katz911
- Re: Displaying Text
- From: Scott McPhillips [MVP]
- Displaying Text
- Prev by Date: Re: Exe Icons in Task Bar
- Next by Date: Re: WaitForSingleObject() will not deadlock
- Previous by thread: Re: Displaying Text
- Next by thread: Re: Displaying Text
- Index(es):
Relevant Pages
|
Loading