Click here to Skip to main content
15,883,883 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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.
Posted
Updated 30-Mar-16 5:32am
Comments
super 30-Mar-16 10:59am    
Can you post the piece of code where you are handling it?

1 solution

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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900