如何删除showwindow创建的GDI对象 [英] How to remove GDI objects created by showwindow

查看:71
本文介绍了如何删除showwindow创建的GDI对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我发现了一个关于ShowWindow API CWnd类的问题,其中ShowWindow会创建一些GDI对象,并且每当调用此API并且此数字增长到10000 gdi以上时,此数字会不断增长崩溃。



我想知道的是,一旦调用killfocus只是为了保持数字不变,如何删除这个API创建的gdi对象。



我尝试了什么:



我试过了一些东西然后只有我我知道这个API是创建那些对象但是没有得到如何解决它。

Hi all ,
I have found one issue regarding ShowWindow API CWnd class wherein ShowWindow creates some GDI objects and this number keeps on growing whenever this API is called and if this number grows above 10000 gdi objects it crashes.

All I want to know is how to remove these gdi objects created by this API once the killfocus is called just to keep the number intact.

What I have tried:

I tried some of the things then only I came to know that this API is created those objects but didn't get how to get around it.

推荐答案

你可能在你的程序中创建GDI对象而不释放它们(调用 DeleteObject )。



参见调试GDI资源泄漏DSUI团队博客 [ ^ ]如何找到罪魁祸首。
You are probably creating GDI objects inside your program without releasing them (calling DeleteObject).

See Debugging a GDI Resource Leak | The DSUI Team Blog[^] on how to find the culprit.


这篇关于如何删除showwindow创建的GDI对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆