橡皮筋画图

Ray_Chang_988 2016-01-05 10:19:15
请教大神,你们使用橡皮筋画图的时候会闪吗?我使用橡皮筋画感觉闪的挺厉害啊。。。,我也知道使用双缓冲,但是实现windows画图板这种功能不都是使用的橡皮筋技术么,我想问的是大家用橡皮筋闪不闪,如果不闪,难道是我的使用有问题?

此为在mousemove中的实现代码:
CClientDC dc(this);
dc.SetROP2(R2_NOTXORPEN);
CBrush *pBrush = CBrush::FromHandle((HBRUSH)GetStockObject(NULL_BRUSH));
CBrush* pOldBrush = dc.SelectObject(pBrush);

dc.Rectangle(CRect(m_ptOrigin, m_ptOld));
dc.Rectangle(CRect(m_ptOrigin, point));

m_ptOld = point;

dc.SelectObject(pOldBrush);
...全文
123 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
Ray_Chang_988 2016-01-05
  • 打赏
  • 举报
回复
谢谢,终于搞定了。。结贴
赵4老师 2016-01-05
  • 打赏
  • 举报
回复
TRACKER: Illustrates Various CRectTracker Styles and Options Click to open or copy the TRACKER project files. The TRACKER sample is a test application that provides an exhaustive illustration of CRectTracker member functions, styles, and options. For a real-world example that uses CRectTracker, see DRAWCLI, the object-oriented drawing sample application. TRACKER initially displays a square with four colored and numbered quadrants. The quadrants are displayed to help you see when the square is inverted horizontally and/or vertically. Initially, the square has no CRectTracker adornments. Try the various toolbar commands, or Edit menu commands, to turn on and off CRectTracker styles, including dotted or solid lines; hatched border, inside or outside the rectangle; and resize handles, inside or outside the rectangle. Notice how the cursor changes shape over parts of the rectangle to indicate what happens if you drag the mouse. Try moving and resizing the rectangle.
Ray_Chang_988 2016-01-05
  • 打赏
  • 举报
回复
自己顶一下。。。。。

15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧