返回哪种类型的DC

返回哪种类型的DC

本文介绍了通过调用GetDC(NULL)返回哪种类型的DC?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Windows API函数 GetDC() 接受一个参数:

The Windows API function GetDC() accepts a single parameter:

在页面的下方,注意以下内容:

Further down the page, the following is noted:

不幸的是,目前尚不清楚屏幕DC是否需要调用 ReleaseDC(),因为在任何地方都未提及其类型.实际上,此页面描述了五种类型的DCs;但他们都没有提到屏幕".

Unfortunately, it is unclear whether calling ReleaseDC() is necessary for a screen DC since its type is not mentioned anywhere. In fact, this page describes five types of DCs; but none of them mention "screen".

我是否需要在屏幕DC上调用 ReleaseDC()?

Do I need to call ReleaseDC() on a screen DC?

推荐答案

屏幕DC不是类DC,也不是私有DC,所以是的-它需要释放.

A screen DC is not a class DC, and it's not a private DC, so yes - it needs to be released.

这篇关于通过调用GetDC(NULL)返回哪种类型的DC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 14:30
查看更多