What is the 2.8 equivalent of wxBG_STYLE_PAINT? Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Tapsa
Earned some good credits
Earned some good credits
Posts: 147
Joined: Tue Dec 06, 2011 5:52 pm
Location: Helsinki

What is the 2.8 equivalent of wxBG_STYLE_PAINT?

Post by Tapsa »

I want to use buffered flicker free DC.
Documentation advises me to call this, but wxBG_STYLE_PAINT is not in wxWidgets source codes.

Code: Select all

wxWindow::SetBackgroundStyle(wxBG_STYLE_PAINT);
Without calling that, the flicker is obvious and the background of my wxPanel is never cleared.
I show graphics in small part of my whole window.

EDIT: Looks like I absolutely need to update to 3.
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: What is the 2.8 equivalent of wxBG_STYLE_PAINT?

Post by doublemax »

Catch the wxEraseEvent for that window and do nothing in the event handler.
Use the source, Luke!
Tapsa
Earned some good credits
Earned some good credits
Posts: 147
Joined: Tue Dec 06, 2011 5:52 pm
Location: Helsinki

Re: What is the 2.8 equivalent of wxBG_STYLE_PAINT?

Post by Tapsa »

Thanks, it worked on my wxPanel.
I hope that this is not just some temporary luck.
Post Reply