]> git.saurik.com Git - wxWidgets.git/commitdiff
Worked around static box opaqueness problem on WinCE by setting the
authorJulian Smart <julian@anthemion.co.uk>
Wed, 28 Jul 2004 09:34:25 +0000 (09:34 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Wed, 28 Jul 2004 09:34:25 +0000 (09:34 +0000)
z-order in OnInitDialog

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28526 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/window.h
src/msw/radiobox.cpp
src/msw/window.cpp

index f244a5f915272777702f987ede63cc1bbbb10d0d..072c9d9651bbf0ac25bca07bed9afa18afa57bd2 100644 (file)
@@ -163,6 +163,7 @@ public:
 
     void OnEraseBackground(wxEraseEvent& event);
     void OnPaint(wxPaintEvent& event);
+    void OnInitDialog( wxInitDialogEvent& event );
 
 public:
     // For implementation purposes - sometimes decorations make the client area
index 53b5d447152329f8a253c3a06236c6d1213fb7cd..524027ecf9e7d15dd2b688b2b6a383b461fc38bb 100644 (file)
@@ -347,9 +347,7 @@ bool wxRadioBox::Create(wxWindow *parent,
 
 #ifdef __WXWINCE__
     // Set the z-order correctly
-    RECT rect;
-    GetWindowRect(GetHwnd(), & rect);
-    SetWindowPos(GetHwnd(), HWND_BOTTOM, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, 0);
+    SetWindowPos(GetHwnd(), HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);
 #endif
 
     SetSelection(0);
index 222138a21c4eda8df1d5643b80b92b215bb6673f..119a50c4a8becd9dfe7729a13ae2d2c679375592 100644 (file)
@@ -5892,3 +5892,36 @@ IMPLEMENT_DYNAMIC_CLASS(wxIdleWakeUpModule, wxModule)
 
 #endif // __WXWINCE__
 
+#ifdef __WXWINCE__
+
+#if wxUSE_STATBOX
+static void wxAdjustZOrder(wxWindow* parent)
+{
+    if (parent->IsKindOf(CLASSINFO(wxStaticBox)))
+    {
+        // Set the z-order correctly
+        SetWindowPos((HWND) parent->GetHWND(), HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);
+    }
+    
+    wxWindowList::compatibility_iterator current = parent->GetChildren().GetFirst();
+    while (current)
+    {
+        wxWindow *childWin = current->GetData();
+        wxAdjustZOrder(childWin);
+        current = current->GetNext();
+    }
+}
+#endif
+
+// We need to adjust the z-order of static boxes in WinCE, to
+// make 'contained' controls visible
+void wxWindowMSW::OnInitDialog( wxInitDialogEvent& event )
+{
+#if wxUSE_STATBOX
+    wxAdjustZOrder(this);
+#endif
+    
+    event.Skip();
+}
+#endif
+