@Override
int hit(Theme theme, Point position, Rectangle bounds) {
if (!(OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ())) return DrawData.WIDGET_NOWHERE;
if (!bounds.contains(position)) return DrawData.WIDGET_NOWHERE;
int hTheme = OS.OpenThemeData(0, getClassId());
RECT rect = new RECT ();
rect.left = bounds.x;
rect.right = bounds.x + bounds.width;
rect.top = bounds.y;
rect.bottom = bounds.y + bounds.height;
POINT pt = new POINT();
pt.x = position.x;
pt.y = position.y;
short[] code = new short[1];
int[] part = getPartId(DrawData.WIDGET_WHOLE);
OS.HitTestThemeBackground(hTheme, 0, part[0], part[1], 0, rect, 0, pt, code);
OS.CloseThemeData (hTheme);
return code[0] == OS.HTNOWHERE ? DrawData.WIDGET_NOWHERE : DrawData.WIDGET_WHOLE;
}