+ // draw the image button here
+ int image_h = 0, image_w = 0, image = wxCLOSED_BUTTON;
+ if (item->IsExpanded()) image = wxOPEN_BUTTON;
+ if (item->IsSelected())
+ image += wxOPEN_BUTTON_SELECTED - wxOPEN_BUTTON;
+ m_imageListButtons->GetSize(image, image_w, image_h);
+ int xx = x - (image_w>>1);
+ int yy = y_mid - (image_h>>1);
+ dc.SetClippingRegion(xx, yy, image_w, image_h);
+ m_imageListButtons->Draw(image, dc, xx, yy,
+ wxIMAGELIST_DRAW_TRANSPARENT);
+ dc.DestroyClippingRegion();
+ }
+ else if (HasFlag(wxTR_TWIST_BUTTONS))
+ {
+ // draw the twisty button here
+ dc.SetPen(*wxBLACK_PEN);
+ dc.SetBrush(*m_hilightBrush);