void Ctrl::DrawCtrlWithParent(Draw& w, int x, int y) { GuiLock __; if(parent) { Rect r = GetRect(); Ctrl *top = parent->GetTopRect(r, inframe); w.Clip(x, y, r.Width(), r.Height()); w.Offset(x - r.left, y - r.top); SystemDraw *ws = dynamic_cast<SystemDraw *>(&w); if(ws) top->UpdateArea(*ws, r); w.End(); w.End(); } else DrawCtrl(w, x, y); }
void CSHeaderCtrl::OnPaint() { CPaintDC dc(this); CMemDC memDC(&dc); DrawCtrl(&memDC); }