Worked around static box opaqueness problem on WinCE by setting the

z-order in OnInitDialog


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28526 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2004-07-28 09:34:25 +00:00
parent 154fd1e473
commit d26e1ab206
3 changed files with 35 additions and 3 deletions

View 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