ExcludeClipRect区域裁剪问题
程序员文章站
2022-10-06 22:21:08
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裁剪出一块区域,则此区域不会受此次绘制影响,保持绘制前状态;
上一篇: thinkPHP模型初始化实例分析
下一篇: 详解php比较操作符的安全问题