#endif
#ifndef WX_PRECOMP
-#include "wx.h"
+#include "wx/wx.h"
#endif
-#if USE_BUTTONBAR && USE_TOOLBAR
+#if wxUSE_BUTTONBAR && wxUSE_TOOLBAR
#ifndef __GNUWIN32__
#include "malloc.h"
#endif
+#ifndef __MWERKS__
#include <memory.h>
+#endif
#include <stdlib.h>
#include "wx/tbarmsw.h"
+#include "wx/event.h"
#include "wx/app.h"
+#include "wx/bitmap.h"
#include "wx/msw/private.h"
#include "wx/msw/dib.h"
/////// Non-Windows 95 implementation
-#if !USE_IMAGE_LOADING_IN_MSW
-#error If USE_IMAGE_LOADING_IN_MSW is set to 0, then USE_BUTTONBAR must be set to 0 too.
+#if !wxUSE_IMAGE_LOADING_IN_MSW
+#error If wxUSE_IMAGE_LOADING_IN_MSW is set to 0, then wxUSE_BUTTONBAR must be set to 0 too.
#endif
#if !USE_SHARED_LIBRARY
// TODO: use the mapping code from wxToolBar95 to get it right in this class
#if !defined(__WIN32__) && !defined(__WIN386__)
- wxBitmap *bitmap2 = NULL;
+ wxBitmap bitmap2;
if (toggle)
{
- bitmap2 = new wxBitmap;
- bitmap2->SetHBITMAP( (WXHBITMAP) CreateMappedBitmap(wxGetInstance(), (HBITMAP) ((wxBitmap& )bitmap).GetHBITMAP()));
+ bitmap2.SetHBITMAP( (WXHBITMAP) CreateMappedBitmap(wxGetInstance(), (HBITMAP) ((wxBitmap& )bitmap).GetHBITMAP()));
}
- wxToolBarTool *tool = new wxToolBarTool(index, bitmap, *bitmap2, toggle, xPos, yPos, helpString1, helpString2);
+ wxToolBarTool *tool = new wxToolBarTool(index, bitmap, bitmap2, toggle, xPos, yPos, helpString1, helpString2);
#else
- 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);
#endif
tool->m_clientData = clientData;