From 257f1d9b855d5cf02d278687bc9240169c3962d1 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 20 Aug 1998 22:47:39 +0000 Subject: [PATCH] wxStaticBitmaps were created invisible - corrected git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@612 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/statbmp.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/msw/statbmp.cpp b/src/msw/statbmp.cpp index 5685792efe..5c56d88f69 100644 --- a/src/msw/statbmp.cpp +++ b/src/msw/statbmp.cpp @@ -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()); -- 2.45.2