1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: src/msw/panel.cpp
3 // Purpose: Implementation of wxMSW-specific wxPanel class.
4 // Author: Vadim Zeitlin
6 // RCS-ID: $Id: wxhead.cpp,v 1.11 2010-04-22 12:44:51 zeitlin Exp $
7 // Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 // ============================================================================
13 // ============================================================================
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
19 // for compilers that support precompilation, includes "wx.h".
20 #include "wx/wxprec.h"
31 // ============================================================================
33 // ============================================================================
35 bool wxPanel
::HasTransparentBackground()
37 for ( wxWindow
*win
= GetParent(); win
; win
= win
->GetParent() )
39 if ( win
->MSWHasInheritableBackground() )
42 if ( win
->IsTopLevel() )
49 void wxPanel
::DoSetBackgroundBitmap(const wxBitmap
& bmp
)
51 delete m_backgroundBrush
;
52 m_backgroundBrush
= bmp
.IsOk() ?
new wxBrush(bmp
) : NULL
;
55 WXHBRUSH wxPanel
::MSWGetCustomBgBrush()
57 if ( m_backgroundBrush
)
58 return (WXHBRUSH
)m_backgroundBrush
->GetResourceHandle();
60 return wxPanelBase
::MSWGetCustomBgBrush();