コード例 #1
0
ファイル: CtrlDraw.cpp プロジェクト: dreamsxin/ultimatepp
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);
}
コード例 #2
0
ファイル: SHeaderCtrl.cpp プロジェクト: killbug2004/cosps
void CSHeaderCtrl::OnPaint() 
{
	CPaintDC dc(this);
	CMemDC memDC(&dc);
	DrawCtrl(&memDC);
}