]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/statbmp.cpp
no message
[wxWidgets.git] / src / msw / statbmp.cpp
index 5685792efe0a746234293661b7438bf45f8efc13..8cf17984c8513efd2d3e0b35bd24927badc05543 100644 (file)
@@ -46,8 +46,8 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id,
   SetName(name);
   if (parent) parent->AddChild(this);
 
-  m_backgroundColour = parent->GetDefaultBackgroundColour() ;
-  m_foregroundColour = parent->GetDefaultForegroundColour() ;
+  m_backgroundColour = parent->GetBackgroundColour() ;
+  m_foregroundColour = parent->GetForegroundColour() ;
 
   if ( id == -1 )
        m_windowId = (int)NewControlId();
@@ -69,14 +69,20 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id,
   // Use an ownerdraw button to produce a static bitmap, since there's
   // no ownerdraw static.
   // TODO: perhaps this should be a static item, with style SS_BITMAP.
-  HWND static_item =
-    CreateWindowEx(0, "BUTTON", "", BS_OWNERDRAW | WS_TABSTOP | WS_CHILD,
-                    0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId,
-                    wxGetInstance(), NULL);
-  m_hWnd = (WXHWND) static_item;
+  m_hWnd = (WXHWND)CreateWindow
+           (
+            "BUTTON",
+            "",
+            BS_OWNERDRAW | WS_TABSTOP | WS_CHILD | WS_VISIBLE,
+            0, 0, 0, 0,
+            (HWND)parent->GetHWND(),
+            (HMENU)m_windowId,
+            wxGetInstance(),
+            NULL
+           );
 
   // Subclass again for purposes of dialog editing mode
-  SubclassWin((WXHWND) static_item);
+  SubclassWin(m_hWnd);
 
   SetFont(* GetParent()->GetFont());