基本概念学习---设备上下文HDC(MFC中设备上下文句柄)
2016-12-28 20:15
211 查看
HDC设备上下文是一种包含有关某个设备(如显示器或打印机)的绘制属性信息的 Windows 数据结构。所有绘制调用都通过设备上下文对象进行,这些对象封装了用于绘制线条、形状和文本的 Windows API。
外文名
HDC
属 于
MFC中的设备上下文句柄
封 装
用于绘制线条等的 Windows API
CDC
MFC的DC的一个类
CDC是MFC的DC的一个类
hDC是DC的句柄,API中的一个类似指针的数据类型.
MFC类的前缀都是C开头的
H开头的大多数是句柄
这是为了助记,是编程读\写代码的好的习惯.
CDC中所有MFC的DC的基类.常用的CClientDC dc(this);就是CDC的子类(或称派生类).
CDC等设备上下文类,都含有一个类的成员变量:m_hDc,用来保存与该类相关的句柄.其道理与CWnd类提供m_Wnd成员变量保存与窗口相关的句柄是一样的。
记住下面的一句话,会有助于你的理解.
DC(设备描述表)在c++中的解释
设备上下文允许在 Windows 中进行与设备无关的绘制。设备上下文可用于绘制到屏幕、打印机或者图元文件。
Device Contexts(设备上下文)
A device context is a structure
that defines a set of graphic objects and their associated attributes,
as well as the graphic modes that affect output. The graphic objects
include a pen for line drawing, a brush for painting and filling, a
bitmap for copying or scrolling parts of the screen, a palette for
defining the set of available colors, a region for clipping and other
operations, and a path for painting and drawing operations. The
remainder of this section is divided into the following three areas.
外文名
HDC
属 于
MFC中的设备上下文句柄
封 装
用于绘制线条等的 Windows API
CDC
MFC的DC的一个类
CDC是MFC的DC的一个类
hDC是DC的句柄,API中的一个类似指针的数据类型.
MFC类的前缀都是C开头的
H开头的大多数是句柄
这是为了助记,是编程读\写代码的好的习惯.
CDC中所有MFC的DC的基类.常用的CClientDC dc(this);就是CDC的子类(或称派生类).
CDC等设备上下文类,都含有一个类的成员变量:m_hDc,用来保存与该类相关的句柄.其道理与CWnd类提供m_Wnd成员变量保存与窗口相关的句柄是一样的。
记住下面的一句话,会有助于你的理解.
DC(设备描述表)在c++中的解释
设备描述
编辑设备上下文允许在 Windows 中进行与设备无关的绘制。设备上下文可用于绘制到屏幕、打印机或者图元文件。
Device Contexts(设备上下文)
A device context is a structure
that defines a set of graphic objects and their associated attributes,
as well as the graphic modes that affect output. The graphic objects
include a pen for line drawing, a brush for painting and filling, a
bitmap for copying or scrolling parts of the screen, a palette for
defining the set of available colors, a region for clipping and other
operations, and a path for painting and drawing operations. The
remainder of this section is divided into the following three areas.
相关文章推荐
- MFC的运行机制 以及 MFC中的DC、CDC、HDC、句柄、设备上下文(整理)
- MFC的运行机制 以及 MFC中的DC、CDC、HDC、句柄、设备上下文
- MFC的运行机制 以及 MFC中的DC、CDC、HDC、句柄、设备上下文(整理)
- 【转】MFC的运行机制 以及 MFC中的DC、CDC、HDC、句柄、设备上下文(整理)
- MFC的运行机制 以及 MFC中的DC、CDC、HDC、句柄、设备上下文(整理)
- MFC的运行机制 以及 MFC中的DC、CDC、HDC、句柄、设备上下文(整理) .
- MFC的运行机制 以及 MFC中的DC、CDC、HDC、句柄、设备上下文 [转]
- MFC中的DC、CDC、HDC、句柄、设备上下文的不同意思,适合初学者参考
- MFC的运行机制 以及 MFC中的DC、CDC、HDC、句柄、设备上下文(整理)
- Linux设备驱动程序学习(20)-内存映射和DMA-基本概念
- MFC的CDC类/设备上下文/设备环境及有关概念
- 基本概念学习之GDI(图形设备接口Graphics Device Interface)
- 详解DC、CDC、HDC、句柄、设备上下文
- C#学习基本概念---MFC(微软基础类库Microsoft Foundation Classes)
- 基本概念学习(1001)---外部设备
- MFC中对话框控件的句柄和设备上下文的问题
- 详解DC、CDC、HDC、句柄、设备上下文
- 孙鑫VC学习笔记:第十四讲 网络的基本概念
- 学习Java的30个基本概念(转)
- C#2.0学习3--面向对象基本概念