MFC绘图学习笔记

来源:互联网 发布:美国劳工部 非农数据 编辑:程序博客网 时间:2024/06/06 10:41

封闭矩形:边界矩形:

边界矩形考虑了画笔的宽度,以避免图形绘制不完整

使用InflateRect(Width, Width)可以扩大矩形

InflateRect inflates CRect by moving its sides away from its center.

规范化的矩形:(左,上)(右,下)

左 <= 右 && 上<= 下

调用NormalizeRect()可以使矩形规范化

CDC类的一个成员函数 SetROP2() 非常适合橡皮筋操作

Raster OPeration To 光栅操作


SetCapture() 视图类继承的函数,

通过调用该函数,可以使视图类获取所有的鼠标消息,当然此时,别的应用程序无法获取鼠标消息

使用 ReleaseCapture() 可以释放强制捕获鼠标消息的命令

GetCapture()

原型:

static CWnd* PASCAL GetCapture( );

Return Value

Identifies the window that has the mouse capture. It is NULL if no window has the mouse capture.

The return value may be temporary and should not be stored for later use.

(msdn)


原创粉丝点击