]> git.saurik.com Git - wxWidgets.git/commit - samples/image/image.cpp
Don't use wxWindow::ClearBackground() in the image sample and explain why.
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 10 May 2010 21:02:30 +0000 (21:02 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 10 May 2010 21:02:30 +0000 (21:02 +0000)
commitf6b4a1b98d5a22a88a5a9a28076079116a2f892e
tree31e54ef3ca424c8995fead0780206a96b451d720
parenta29df0623194319a0f7c670e22424f1f69159a80
Don't use wxWindow::ClearBackground() in the image sample and explain why.

Painting on both wxPaintDC and wxClientDC simultaneously doesn't work well,
e.g. under Windows the client DC can be actually erased after we finished
painting the window contents, overwriting it.

Simply use wxDC::Clear() instead of wxWindow::ClearBackground() to avoid this
and document the danger of using ClearBackground() from EVT_PAINT handler.

Closes #10700.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
interface/wx/window.h
samples/image/image.cpp