欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

ExcludeClipRect区域裁剪问题

程序员文章站 2022-04-28 10:49:03
CPaintDC dc(this); CRect rt1; CPen newPen; newPen.CreatePen(PS_SOLID,1,RGB(0,0,0)); CPen *pOldPen = dc.SelectObject(&newPen); CBrush* pOldBrush = (CBr ......

cpaintdc dc(this);
crect rt1;
cpen newpen;
newpen.createpen(ps_solid,1,rgb(0,0,0));
cpen *poldpen = dc.selectobject(&newpen);
cbrush* poldbrush = (cbrush*)dc.selectstockobject(null_brush);
getdlgitem(idc_button_query)->getwindowrect(&rt1);
dc.excludecliprect(rt1);
dc.roundrect(rt,cpoint(10,10));
dc.selectobject(poldpen);
dc.selectobject(poldbrush);

绘制时使用excludecliprect裁剪出一块区域,则此区域不会受此次绘制影响,保持绘制前状态;

ExcludeClipRect区域裁剪问题