+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"));
+ }
+ }
+}
+
+WXLRESULT
+wxStatusBar95::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
+{
+#ifndef __WXWINCE__
+ if ( nMsg == WM_WINDOWPOSCHANGING )
+ {
+ WINDOWPOS *lpPos = (WINDOWPOS *)lParam;
+ int x, y, w, h;
+ GetPosition(&x, &y);
+ GetSize(&w, &h);
+
+ // we need real window coords and not wx client coords
+ AdjustForParentClientOrigin(x, y);
+
+ lpPos->x = x;
+ lpPos->y = y;
+ lpPos->cx = w;
+ lpPos->cy = h;
+
+ return 0;
+ }
+
+ if ( nMsg == WM_NCLBUTTONDOWN )
+ {
+ // if hit-test is on gripper then send message to TLW to begin
+ // resizing. It is possible to send this message to any window.
+ if ( wParam == HTBOTTOMRIGHT )
+ {
+ wxWindow *win;
+
+ for ( win = GetParent(); win; win = win->GetParent() )
+ {
+ if ( win->IsTopLevel() )
+ {
+ SendMessage(GetHwndOf(win), WM_NCLBUTTONDOWN,
+ wParam, lParam);
+
+ return 0;
+ }
+ }
+ }
+ }
+#endif
+
+ return wxStatusBarBase::MSWWindowProc(nMsg, wParam, lParam);
+}
+