X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d0b223a1483141d4a6535af46141943f30e5a40b..c641b1d20d5c6dae5663070f45fe11a871565df0:/src/msw/statbmp.cpp?ds=sidebyside diff --git a/src/msw/statbmp.cpp b/src/msw/statbmp.cpp index 2f54f08674..f51c590ce6 100644 --- a/src/msw/statbmp.cpp +++ b/src/msw/statbmp.cpp @@ -28,6 +28,8 @@ #pragma hdrstop #endif +#if wxUSE_STATBMP + #include "wx/window.h" #include "wx/msw/private.h" @@ -85,6 +87,12 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id, // be ignored by Windows wxIcon *icon = (wxIcon *)NULL; m_isIcon = bitmap.IsKindOf(CLASSINFO(wxIcon)); + +#ifdef __WIN16__ + wxASSERT_MSG( !m_isIcon, "Icons are not supported in wxStaticBitmap under WIN16." ); +#endif + +#ifndef __WIN16__ if ( !m_isIcon ) { const wxBitmap& bmp = (const wxBitmap&)bitmap; @@ -97,6 +105,7 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id, m_isIcon = TRUE; } } +#endif #ifdef __WIN32__ // create a static control with either SS_BITMAP or SS_ICON style depending @@ -108,12 +117,16 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id, int winstyle = BS_OWNERDRAW; #endif // Win32 + if ( m_windowStyle & wxCLIP_SIBLINGS ) + winstyle |= WS_CLIPSIBLINGS; + + m_hWnd = (WXHWND)::CreateWindow ( classname, wxT(""), // NOT DISABLED!!! We want to move it in Dialog Editor. - winstyle | WS_CHILD | WS_VISIBLE, // | WS_DISABLED, + winstyle | WS_CHILD | WS_VISIBLE /* | WS_CLIPSIBLINGS */ , // | WS_DISABLED, 0, 0, 0, 0, (HWND)parent->GetHWND(), (HMENU)m_windowId, @@ -259,3 +272,4 @@ long wxStaticBitmap::MSWWindowProc(WXUINT nMsg, return wxWindow::MSWWindowProc(nMsg, wParam, lParam); } +#endif // wxUSE_STATBMP