- 1
- 0
- 约7.89千字
- 约 21页
- 2016-11-27 发布于河南
- 举报
visualC2010第二讲CDC概论
第二讲 CDC概论 主讲 朱世华 一 CDC 及其派生类 The CDC object provides member functions for working with a device context, such as a display or printer, as well as members for working with a display context associated with the client area of a window. Do all drawing through the member functions of a CDC object. The class provides member functions for device-context operations, working with drawing tools, type-safe graphics device interface (GDI) object selection, and working with colors and palettes. It also provides member functions for getting and setting drawing attributes, mapping, working with the viewport, working with the window extent, converting coordinates, working with regions, clipping, drawing lines, and drawing simple shapes, ellipses, and polygons. Member functions are also provided for drawing text, working with fonts, using printer escapes, scrolling, and playing metafiles For specific uses, the Microsoft Foundation Class Library provides several classes derived from CDC . CPaintDC encapsulates calls to BeginPaint and EndPaint. CClientDC manages a display context associated with a windows client area. CWindowDC manages a display context associated with an entire window, including its frame and controls. CMetaFileDC associates a device context with a metafile. CDC provides two member functions, GetLayout and SetLayout, for reversing the layout of a device context, which does not inherit its layout from a window. Such right-to-left orientation is necessary for applications written for cultures, such as Arabic or Hebrew, where the character layout is not the European standard. CDC contains two device contexts, m_hDC and m_hAttribDC, which, on creation of a CDC object, refer to the same device. CDC directs all output GDI calls to m_hDC and most attribute GDI calls to m_hAttribDC. (An example of an attribute call is GetTextColor, while SetTextColor is an output call.) For example, the framework uses these two device contexts to implement a CMetaFileDC object that will se
您可能关注的文档
最近下载
- 制造业信息化战略规划实施与优化-PDM.docx VIP
- 那智不二越机器人flexgui toolbox操作说明书.pdf VIP
- 智慧工厂-智慧工厂解决方案.docx VIP
- 高中化学解题方法归纳:和量法.doc VIP
- 译林牛津新版高中英语(必修1-3)单词表.pdf VIP
- 包装有限公司分切机安全风险分级清单.docx VIP
- 重庆市西南大学附属中学2025届高三下学期二诊模拟考试物理试卷 含解析.docx VIP
- 【高中英语】《星火英语同步词汇》抗遗忘速记手册.docx VIP
- 成都市锦江区2026届初三一诊(暨期末考试)数学试卷(含答案).docx
- 三坐标 培训教程.pptx VIP
原创力文档

文档评论(0)