MFC绘图学习笔记
2011-08-16 15:25
357 查看
封闭矩形:边界矩形:
边界矩形考虑了画笔的宽度,以避免图形绘制不完整
使用InflateRect(Width, Width)可以扩大矩形
InflateRect inflates CRect by moving its sides away from its center.
规范化的矩形:(左,上)(右,下)
左 <= 右 && 上<= 下
调用NormalizeRect()可以使矩形规范化
CDC类的一个成员函数 SetROP2() 非常适合橡皮筋操作
Raster OPeration To 光栅操作
SetCapture() 视图类继承的函数,
通过调用该函数,可以使视图类获取所有的鼠标消息,当然此时,别的应用程序无法获取鼠标消息
使用 ReleaseCapture() 可以释放强制捕获鼠标消息的命令
GetCapture()
原型:
The return value may be temporary and should not be stored for later use.
(msdn)
边界矩形考虑了画笔的宽度,以避免图形绘制不完整
使用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)
相关文章推荐
- 孙鑫VC++视频学习笔记之3: MFC消息映射机制和绘图DC
- MFC学习笔记之绘图控制
- MFC学习笔记之一(绘图+控制)
- MFC学习笔记之三————区分窗口类对象以及窗口&&四种获得DC方式绘图
- [mfc学习笔记一]以一个CGdiObject类的绘图例子来看一下绘图操作
- 达内学习笔记——MFC绘图对象
- MFC学习笔记——GDI绘图
- MFC学习笔记.day02续-CDC类,绘图区域,CPen画笔,画刷 CBrush,DC设备描述表
- MFC学习笔记 简单绘图及相关函数
- 孙鑫VC学习笔记:第十五讲 (四) 编写一个基于MFC对话框的聊天程序
- MFC学习笔记之七————工具栏编程与状态栏编程
- MFC学习笔记(一)
- MFC学习笔记——基础
- 【8-23】MFC学习笔记 01
- mfc学习笔记之如何修改mfc消息机制处理顺序
- 慕课—R语言之数据可视化—学习笔记 3.4Lattice绘图系统
- MFC学习笔记——void CLi11View::OnDraw(CDC* /*pDC*/)
- Android Drawable绘图学习笔记
- MFC学习笔记CDocTemplate(一)
- MFC学习笔记之简单MP3播放器的设计