-    dst = src.Copy();
-
-    unsigned char rBg, gBg, bBg;
-    if ( src.HasMask() )
-    {
-        src.GetOrFindMaskColour(&rBg, &gBg, &bBg);
-        dst.SetMaskColour(rBg, gBg, bBg);
-    }
-    else // assuming the pixels along the edges are of the background color
-    {
-        rBg = src.GetRed(0, 0);
-        gBg = src.GetGreen(0, 0);
-        bBg = src.GetBlue(0, 0);
-    }
-
-    const wxColour colBg(rBg, gBg, bBg);
-
-    const wxColour colDark = wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW);
-    const wxColour colLight = wxSystemSettings::GetColour(wxSYS_COLOUR_3DHIGHLIGHT);
-
-    // Second attempt, just making things monochrome
-    const int width = src.GetWidth();
-    const int height = src.GetHeight();
+    wxToolBarToolBase * const tool = FindById(toolid);
+    wxCHECK_MSG( tool, false, wxT("invalid tool id") );