X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c0ed460c2e7802793d591c84f3cfdbff159c5549..2004484f9b139978e86c3e9e102001a46f493576:/src/msw/tbarmsw.cpp diff --git a/src/msw/tbarmsw.cpp b/src/msw/tbarmsw.cpp index 15dd0eafae..cfbe78c95d 100644 --- a/src/msw/tbarmsw.cpp +++ b/src/msw/tbarmsw.cpp @@ -21,7 +21,7 @@ #endif #ifndef WX_PRECOMP -#include "wx.h" +#include "wx/wx.h" #endif #if wxUSE_BUTTONBAR && wxUSE_TOOLBAR @@ -30,11 +30,15 @@ #include "malloc.h" #endif +#ifndef __MWERKS__ #include +#endif #include #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" @@ -339,14 +343,13 @@ wxToolBarTool *wxToolBarMSW::AddTool(int index, const wxBitmap& bitmap, const wx // 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, wxNullBitmap, toggle, xPos, yPos, helpString1, helpString2); #endif