X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/edccf4281bc8fbb9d8151240ba5b208339c9ac11..2356708db31b737c6eae53c2316b642aa5a2e68d:/src/msw/tbar95.cpp diff --git a/src/msw/tbar95.cpp b/src/msw/tbar95.cpp index 5bdaae246b..51c70e7556 100644 --- a/src/msw/tbar95.cpp +++ b/src/msw/tbar95.cpp @@ -32,15 +32,17 @@ #include -#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__) +#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS) #include #endif #ifndef __TWIN32__ #ifdef __GNUWIN32__ +#ifndef wxUSE_NORLANDER_HEADERS #include "wx/msw/gnuwin32/extra.h" #endif #endif +#endif #include "wx/msw/dib.h" #include "wx/tbar95.h" @@ -254,7 +256,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); @@ -273,7 +277,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.