+static int GetBorderWidth(wxSystemMetric index, wxWindow* win)
+{
+ if (win->m_wxwindow)
+ {
+ wxPizza* pizza = WX_PIZZA(win->m_wxwindow);
+ int x, y;
+ pizza->get_border_widths(x, y);
+ switch (index)
+ {
+ case wxSYS_BORDER_X:
+ case wxSYS_EDGE_X:
+ case wxSYS_FRAMESIZE_X:
+ return x;
+ default:
+ return y;
+ }
+ }
+ return -1;
+}
+