Handle deprecated background styles correctly in wxMSW.
Handle wxBG_STYLE_TRANSPARENT as wxBG_STYLE_PAINT and wxBG_STYLE_COLOUR as wxBG_STYLE_ERASE instead of asserting (and almost surely crashing next, as this assert is in the code called when the window is repainted and so will be called again when the assert dialog is shown resulting in reentrant assert). Closes #11208. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62049 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -4760,6 +4760,7 @@ bool wxWindowMSW::HandleEraseBkgnd(WXHDC hdc)
|
||||
switch ( GetBackgroundStyle() )
|
||||
{
|
||||
case wxBG_STYLE_ERASE:
|
||||
case wxBG_STYLE_COLOUR:
|
||||
// we need to generate an erase background event
|
||||
{
|
||||
wxDCTemp dc(hdc, GetClientSize());
|
||||
@@ -4794,6 +4795,7 @@ bool wxWindowMSW::HandleEraseBkgnd(WXHDC hdc)
|
||||
break;
|
||||
|
||||
case wxBG_STYLE_PAINT:
|
||||
case wxBG_STYLE_TRANSPARENT:
|
||||
// no need to do anything here at all, background will be entirely
|
||||
// redrawn in WM_PAINT handler
|
||||
break;
|
||||
|
Reference in New Issue
Block a user