+
+ // we have to trigger wxSizeEvent if there are children window in status
+ // bar because GetFieldRect returned incorrect (not updated) values up to
+ // here, which almost certainly resulted in incorrectly redrawn statusbar
+ if ( m_children.GetCount() > 0 )
+ {
+ wxSizeEvent event(GetClientSize(), m_windowId);
+ event.SetEventObject(this);
+ GetEventHandler()->ProcessEvent(event);
+ }
+}
+
+void wxStatusBar95::SetStatusStyles(int n, const int styles[])
+{
+ wxStatusBarBase::SetStatusStyles(n, styles);
+
+ if (n != m_nFields)
+ return;
+
+ for (int i = 0; i < n; i++)
+ {
+ int style;
+ switch(styles[i])
+ {
+ case wxSB_RAISED:
+ style = SBT_POPOUT;
+ break;
+ case wxSB_FLAT:
+ style = SBT_NOBORDERS;
+ break;
+ case wxSB_NORMAL:
+ default:
+ style = 0;
+ break;
+ }
+ // The SB_SETTEXT message is both used to set the field's text as well as
+ // the fields' styles. MSDN library doesn't mention
+ // that nField and style have to be 'ORed'
+ wxString text = GetStatusText(i);
+ if (!StatusBar_SetText(GetHwnd(), style | i, text))
+ {
+ wxLogLastError(wxT("StatusBar_SetText"));
+ }
+ }