X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/837e57436a89516a5fa9f478f401e06bd872c17c..48a84964c6400fddc79651ef6d74d7a979207ef1:/src/msw/tbar95.cpp diff --git a/src/msw/tbar95.cpp b/src/msw/tbar95.cpp index aef9105c82..6a9fcc6cfa 100644 --- a/src/msw/tbar95.cpp +++ b/src/msw/tbar95.cpp @@ -99,6 +99,8 @@ bool wxToolBar95::Create(wxWindow *parent, long style, const wxString& name) { + m_hWnd = 0; + m_backgroundColour = wxColour(GetRValue(GetSysColor(COLOR_BTNFACE)), GetGValue(GetSysColor(COLOR_BTNFACE)), GetBValue(GetSysColor(COLOR_BTNFACE))); @@ -252,7 +254,9 @@ bool wxToolBar95::CreateTools() replaceBitmap.nIDNew = (UINT) (HBITMAP) m_hBitmap; replaceBitmap.nButtons = noButtons; if (::SendMessage((HWND) GetHWND(), TB_REPLACEBITMAP, (WPARAM) 0, (LPARAM) &replaceBitmap) == -1) + { wxFAIL_MSG(_T("Could not add bitmap to toolbar")); + } ::DeleteObject((HBITMAP) oldToolBarBitmap); @@ -271,7 +275,9 @@ bool wxToolBar95::CreateTools() addBitmap.hInst = 0; addBitmap.nID = (UINT)m_hBitmap; if (::SendMessage((HWND) GetHWND(), TB_ADDBITMAP, (WPARAM) noButtons, (LPARAM) &addBitmap) == -1) + { wxFAIL_MSG(_T("Could not add bitmap to toolbar")); + } } // Now add the buttons.