Posted on 2008-11-16 12:02
chefZ 阅读(157)
评论(0) 编辑 收藏 引用
// a helper class gives 4 coordinates instead of making func calls
//for calculations
class wxRectXY : public wxRect
{
public:
wxRectXY(){left = x; top = y; right = left + width; bottom = top - height; }
int left, top, right, bottom;
};
....
wxPaintDC dc(this);
wxWindow* myWnd = FindWindow(_("ID_xxx"));
wxRectXY* rect = (wxRectXY*)&myWnd->GetRect();
dc.FloodFill(rect->left, rect->top, wxColor(wxT("#ffffff"))); //with WHITE brush