X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8a0681f9338345d0ef32b2ad809d49fd20861119..3d1b41968fcc7b49610de3c8ce81040b3a3096a8:/src/msw/tbarmsw.cpp?ds=sidebyside diff --git a/src/msw/tbarmsw.cpp b/src/msw/tbarmsw.cpp index e7ab1de5c8..5de16db0f8 100644 --- a/src/msw/tbarmsw.cpp +++ b/src/msw/tbarmsw.cpp @@ -32,7 +32,7 @@ #include "wx/wx.h" #endif -#if wxUSE_BUTTONBAR && wxUSE_TOOLBAR && !wxUSE_TOOLBAR_SIMPLE +#if wxUSE_TOOLBAR && defined(__WIN16__) #if !defined(__WIN32__) && !wxUSE_IMAGE_LOADING_IN_MSW #error wxToolBar needs wxUSE_IMAGE_LOADING_IN_MSW under Win16 @@ -48,7 +48,7 @@ #include -#include "wx/tbarmsw.h" +#include "wx/msw/tbarmsw.h" #include "wx/event.h" #include "wx/app.h" #include "wx/bitmap.h" @@ -491,7 +491,7 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase) // TODO: use the mapping code from wxToolBar95 to get it right in this class #if !defined(__WIN32__) && !defined(__WIN386__) wxBitmap bitmap2; - if (toggle) + if (tool->CanBeToggled()) { HBITMAP hbmp = CreateMappedBitmap((WXHINSTANCE)wxGetInstance(), GetHbitmapOf(tool->GetBitmap1())); @@ -747,8 +747,11 @@ void wxToolBar::DrawBlankButton(WXHDC hdc, int x, int y, int dx, int dy, int sta } } -void wxToolBar::DrawButton(WXHDC hdc, int x, int y, int dx, int dy, wxToolBarTool *tool, int state) +void wxToolBar::DrawButton(WXHDC hdc, int x, int y, int dx, int dy, + wxToolBarToolBase *toolBase, int state) { + wxToolBarTool *tool = (wxToolBarTool *)toolBase; + int yOffset; HBRUSH hbrOld, hbr; BOOL bMaskCreated = FALSE;