wxWidgets 101 - 16 FloodFill quick

// 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

你可能感兴趣的:(wxWidgets 101 - 16 FloodFill quick)