DC of VC ++ learning notes (devicecontext device description table)

Source: Internet
Author: User

DC (device context device description table)
DC is an inclusive device (physical output device, such as a display, and device driver)Program) Structure of information. In windows, all graphic operations are performed using DC. For example, a teacher asks a student to draw a Forest image. Some students use a sketch, and some students use

Watercolor Painting, some students use oil paintings, the results are drawn from the forest, but the painting method is different. We are students. If the teacher specifies a painting method today and another painting method tomorrow, we must spend a lot of time and energy learning and mastering it, then the image can be drawn as required. In fact, the painting method is different here.

That is, the tools used are different. To put it bluntly, the graphics devices and their drivers in the computer are different. To draw a graph on a computer, we need to use all its graphic devices and their drivers to call the driver interface to display the graph. Different devices have different drivers.

It is impossible for a computer to use a unified graphic device. We need to master various drivers, and the workload is too heavy. So we need a "Universal driver" (calling these drivers in a unified way) to make us a "teacher" role. Just say it and draw the forest.

So you don't have to pay attention to what method to draw. This "Universal driver" is a DC provided by windows. The DC will deal with the device driver to complete the drawing. The effect of the image is determined by the graphic device used. In fact, DC is also a kind of resource, and it does not

What is a "Universal driver", but whether it is display or print, we can get the HC handle, and then operate on the DC, and the DC maps to these physical devices.

 

Friend, if you have any insights, you can add "Sina Weibo"/MSN Oh, starrycheng@live.com, we all discuss together, study together.

Finally, let's add one point for the whole space system.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.