Don't draw over dummy separators in MSW toolbar, just don't draw them at all.

Prevent the native toolbar from drawing the separators which we use simply as
placeholders by excluding them from the update region when handling WM_PAINT.

This reduces flicker by not redrawing the areas occupied by these separators
twice and also prevents them from ever being shown (you could see them briefly
appear before being erased before).

The other toolbar tools still flicker though, there doesn't seem to be any
simple way to prevent the control from entirely invalidating itself whenever
it is resized.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62934 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-12-18 22:31:48 +00:00
parent cd57c6d690
commit 8c118ca4cb
2 changed files with 32 additions and 115 deletions

View File

@@ -156,12 +156,6 @@ private:
// have
void UpdateStretchableSpacersSize();
#ifndef __WXWINCE__
// redraw the background of the given part of the window to erase separator
// drawn in it
void MSWEraseRect(wxDC& dc, const wxRect& rectItem);
#endif // !__WXWINCE__
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxToolBar)
wxDECLARE_NO_COPY_CLASS(wxToolBar);