- 外文名
- HDC
- 用 途
- 用於繪製線條等的 Windows API
HDC簡介
編輯CDC是MFC的DC的一個類
hDC是DC的句柄,API中的一個類似指針的數據類型.
MFC類的前綴都是C開頭的
H開頭的大多數是句柄
這是為了助記,是編程讀\寫代碼的好的習慣.
CDC中所有MFC的DC的基類.常用的CClientDC dc(this);就是CDC的子類(或稱派生類).
記住下面的一句話,會有助於你的理解.
DC(設備描述表)在c++中的解釋
HDC設備描述
編輯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.