VC++中“device context”的具体意思是?

来源:百度知道 编辑:UC知道 时间:2024/05/29 04:11:35
不是说“设备上下文吧”?
在牵扯到CDC类的时候总出现这个词,一直不很确定它的具体含义
能再具体解释一下么,这个“设备”是指?

那样翻译的话感觉有点牵强

我的理解是设备的相关信息

The Device Context

A handle, you'll recall, is simply a number that Windows uses for internal reference to an object. You obtain the handle from Windows and then use the handle in other functions. The device context handle is your window's passport to the GDI functions. With that device context handle you are free to paint your client area and make it as beautiful or as ugly as you like.

The device context (also called simply the "DC") is really just a data structure maintained internally by GDI. A device context is associated with a particular display device, such as a video display or a printer. For a video display, a device context is usually associated with a particular window on the display.

Some of the values in the device context are graphics "attributes." These attributes define some particulars of how GDI drawing functions work. With TextOut, for instance, the attr