X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/837e57436a89516a5fa9f478f401e06bd872c17c..37b8e6798782278fdfe4f3c1291aaff55cdbb8c9:/src/msw/statbr95.cpp diff --git a/src/msw/statbr95.cpp b/src/msw/statbr95.cpp index 2263d1a3bb..8a0063d0b1 100644 --- a/src/msw/statbr95.cpp +++ b/src/msw/statbr95.cpp @@ -36,19 +36,17 @@ #include "wx/msw/private.h" #include -#if !defined(__GNUWIN32__) || defined(__TWIN32__) +#if !defined(__GNUWIN32__) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS) #include #endif #if wxUSE_NATIVE_STATUSBAR -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxStatusBar95, wxStatusBar); BEGIN_EVENT_TABLE(wxStatusBar95, wxStatusBar) EVT_SIZE(wxStatusBar95::OnSize) END_EVENT_TABLE() -#endif //USE_SHARED_LIBRARY // ---------------------------------------------------------------------------- @@ -97,11 +95,11 @@ bool wxStatusBar95::Create(wxWindow *parent, wxWindowID id, long style) wstyle |= SBARS_SIZEGRIP; m_hWnd = (WXHWND)CreateStatusWindow(wstyle, - _T(""), + wxT(""), (HWND)parent->GetHWND(), m_windowId); if ( m_hWnd == 0 ) { - wxLogSysError(_T("can't create status bar window")); + wxLogSysError(wxT("can't create status bar window")); return FALSE; } @@ -147,6 +145,9 @@ void wxStatusBar95::SetStatusWidths(int n, const int widths[]) void wxStatusBar95::SetFieldsWidth() { + if ( !m_nFields ) + return; + int *pWidths = new int[m_nFields]; int nWindowWidth, y; @@ -191,7 +192,7 @@ void wxStatusBar95::SetFieldsWidth() } if ( !StatusBar_SetParts(hwnd, m_nFields, pWidths) ) { - wxLogDebug(_T("StatusBar_SetParts failed.")); + wxLogLastError(wxT("StatusBar_SetParts")); } delete [] pWidths; @@ -200,7 +201,7 @@ void wxStatusBar95::SetFieldsWidth() void wxStatusBar95::SetStatusText(const wxString& strText, int nField) { if ( !StatusBar_SetText(hwnd, nField, strText) ) { - wxLogDebug(_T("StatusBar_SetText failed")); + wxLogLastError(wxT("StatusBar_SetText")); } } @@ -208,7 +209,7 @@ wxString wxStatusBar95::GetStatusText(int nField) const { wxASSERT( (nField > -1) && (nField < m_nFields) ); - wxString str(_T("")); + wxString str(wxT("")); int len = StatusBar_GetTextLen(hwnd, nField); if (len > 0) {