A
Arnold the Aardvark
[New to MFC]
I am creating a custom draw tree view based on CTreeCtrl.
When the control is re-sized the background is blanked
completely, resulting in a horrible flicker.
I've seen various suggestions involving the use of double
buffering. Those are fine but I want to understand what is
wrong. When I created the same control in C++Builder the
view was totally flicker free, so this must be something
the framework does (or doesn't).
Now, from the good old days of plain C API programming, I
vaguely remember that you could override the default
behaviour of a window class (to blank the background with
the brush supplied in WNDCLASS). Gonna have to find my
Petzold...
So my question is: how do I do this in MFC? I have spent
all afternoon fiddling with likely candidates, but the
tree view is blanked before any of them are called.
Also, how can a tell Windows to start sending all the
Custom Draw notifications from inside OnPaint()?
Thanks.
Arnold the Aardvark
'And no, C++ does not have "garbage collection".
Thank God for that. C++ gives me the ability to not
create garbage in the first place.' - Ed Mulroy
I am creating a custom draw tree view based on CTreeCtrl.
When the control is re-sized the background is blanked
completely, resulting in a horrible flicker.
I've seen various suggestions involving the use of double
buffering. Those are fine but I want to understand what is
wrong. When I created the same control in C++Builder the
view was totally flicker free, so this must be something
the framework does (or doesn't).
Now, from the good old days of plain C API programming, I
vaguely remember that you could override the default
behaviour of a window class (to blank the background with
the brush supplied in WNDCLASS). Gonna have to find my
Petzold...
So my question is: how do I do this in MFC? I have spent
all afternoon fiddling with likely candidates, but the
tree view is blanked before any of them are called.
Also, how can a tell Windows to start sending all the
Custom Draw notifications from inside OnPaint()?
Thanks.
Arnold the Aardvark
'And no, C++ does not have "garbage collection".
Thank God for that. C++ gives me the ability to not
create garbage in the first place.' - Ed Mulroy