X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/088a95f5ffcbcb035596f52cf035372d13d280fc..520e470fdd0daef09c77938db642e4583933c90d:/src/msw/tbar95.cpp diff --git a/src/msw/tbar95.cpp b/src/msw/tbar95.cpp index 12b4f41ba8..772e4cab64 100644 --- a/src/msw/tbar95.cpp +++ b/src/msw/tbar95.cpp @@ -24,7 +24,7 @@ #include "wx.h" #endif -#if USE_BUTTONBAR && USE_TOOLBAR && defined(__WIN95__) +#if wxUSE_BUTTONBAR && wxUSE_TOOLBAR && defined(__WIN95__) #ifndef __GNUWIN32__ #include "malloc.h" @@ -100,10 +100,6 @@ bool wxToolBar95::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, co GetGValue(GetSysColor(COLOR_BTNFACE)), GetBValue(GetSysColor(COLOR_BTNFACE))); m_foregroundColour = *wxBLACK ; - m_defaultForegroundColour = *wxBLACK ; - m_defaultBackgroundColour = wxColour(GetRValue(GetSysColor(COLOR_BTNFACE)), - GetGValue(GetSysColor(COLOR_BTNFACE)), GetBValue(GetSysColor(COLOR_BTNFACE))); - if (style & wxTB_VERTICAL) wxMessageBox("Sorry, wxToolBar95 under Windows 95 only supports horizontal orientation.", "wxToolBar95 usage", wxOK); m_maxWidth = -1; @@ -383,7 +379,7 @@ void wxToolBar95::SetRows(int nRows) wxSize wxToolBar95::GetMaxSize(void) const { - if (m_maxWidth == -1 | m_maxHeight == -1) + if ((m_maxWidth == -1) || (m_maxHeight == -1)) { RECT rect; ::SendMessage((HWND) GetHWND(), TB_SETROWS, MAKEWPARAM(m_maxRows, TRUE), (LPARAM) & rect); @@ -451,7 +447,7 @@ void wxToolBar95::ClearTools(void) wxToolBarTool *wxToolBar95::AddTool(int index, const wxBitmap& bitmap, const wxBitmap& pushedBitmap, bool toggle, long xPos, long yPos, wxObject *clientData, const wxString& helpString1, const wxString& helpString2) { - wxToolBarTool *tool = new wxToolBarTool(index, bitmap, (wxBitmap *)NULL, toggle, xPos, yPos, helpString1, helpString2); + wxToolBarTool *tool = new wxToolBarTool(index, bitmap, wxNullBitmap, toggle, xPos, yPos, helpString1, helpString2); tool->m_clientData = clientData; if (xPos > -1) @@ -475,8 +471,6 @@ void wxToolBar95::OnSysColourChanged(wxSysColourChangedEvent& event) { m_backgroundColour = wxColour(GetRValue(GetSysColor(COLOR_BTNFACE)), GetGValue(GetSysColor(COLOR_BTNFACE)), GetBValue(GetSysColor(COLOR_BTNFACE))); - m_defaultBackgroundColour = wxColour(GetRValue(GetSysColor(COLOR_BTNFACE)), - GetGValue(GetSysColor(COLOR_BTNFACE)), GetBValue(GetSysColor(COLOR_BTNFACE))); // Remap the buttons CreateTools();