DC(Device Context),中文叫设备上下文(Context有环境和上下文的意思,我觉得环境要贴切的多,不知道为什么要用上下文这个意思,你知道的话评论告诉我啊)。DC相信你经常用到。不知道?不知道就对了,但你确实经常用它。几乎涉及到绘图的(如PictureBox、Form)都有自己的DC。如果你用过VB6.0,hDC总见过吧?hDC就是DC的Handle。虽然经常用,但你未必知道它是个什么东西吧,你要是都知道,那我还写这篇文章干什么。
MSDN的说法:
Adevice context is a structure that defines a set of graphic objects and theirassociated attributes, as well as the graphic modes that affect output. Thegraphic objects include a pen for line drawing, a brush for painting andfilling, a bitmap for copying or scrolling parts of the screen, a palette fordefining the set of available colors, a region for clipping and otheroperations, and a path for painting and drawing operations.
中文翻译:
DC是一种定义绘图对象集合及其相关属性的结构,它也定义了影响输出结果的绘图模式。其中,绘图对象包含一个用于画线的pen(笔),一个用于填充