]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/statbmp.cpp
fixed FindOrCreatePen/Brush() for the case when the object couldn't be created succes...
[wxWidgets.git] / src / msw / statbmp.cpp
index 909a09c5325afee6f66e70241dba40d1dcbb3c57..fd9dd5db304d3526f232b9b67c2a87361333c27b 100644 (file)
@@ -85,6 +85,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 +103,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
@@ -112,7 +119,8 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id,
                        (
                         classname,
                         wxT(""),
-                        winstyle | WS_CHILD | WS_VISIBLE | WS_DISABLED,
+                        // NOT DISABLED!!! We want to move it in Dialog Editor.
+                        winstyle | WS_CHILD | WS_VISIBLE /* | WS_CLIPSIBLINGS */ , // | WS_DISABLED,
                         0, 0, 0, 0,
                         (HWND)parent->GetHWND(),
                         (HMENU)m_windowId,