HDC hdc;
hdc是一个句柄,它可以指向一个系统对象
CDC dc;
CDC是一个类,dc是它的一个对象,这个类是专门用于封装HDC的,比如可以这样dc.Attach(hdc);接着就可以通过dc来操作那个系统对象
也可以这样说,HDC定义的变量指向一块内存,这块 内存用来描述一个设备的相关的内容,所以也可以
认为HDC定义的是一个指针;而CDC类定义一个对象, 这个对象拥有HDC定义的一个设备描述表,同时也包
含与HDC相关的操作的函数. 这与HPEN和CPen,POINT与CPoint之间的差别是一样
的。HDC是一个句柄 ,this property returns a handle provided by Windows CE to the device context of an object.
CDC是一个类, CDC class defines a class of device-context objects. 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.
CDC dc(this);HDC hdc;hdc =dc->m_hdc;