HDC(转)

cDC是MFC的DC的一个类
  hDC是DC的 句柄 ,API中的一个类似指针的数据类型.
  MFC类的前缀都是C开头的
  H开头的大多数是句柄
  这是为了助记,是编程读\写代码的好的习惯.
  CDC中所有MFC的DC的基类.常用的CClientDC dc(this);就是CDC的子类(或称 派生类 ).
  CDC等设备上下分类,都含有一个类的成员变量:m_nHdc;即HDC类型的句柄.
  记住下面的一句话,会有助于你的理解.
  MFC的类,是在用window API语句开发出来的有一定功能的小程序.(也可称为类).使用它的默认方法,就是,记住它的名字与参数(可以用笔记,代替脑记).
  DC( 设备上下文 )在c++中的解释:
  设备上下文
   设备上下文 是一种包含有关某个设备(如显示器或打印机)的绘制属性信息的 Windows 数据结构。所有绘制调用都通过设备上下文对象进行,这些对象封装了用于绘制线条、形状和文本的 Windows API。设备上下文允许在 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.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值