Print Page | Close Window

GDI leak in CXTPPopupControl

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=16181
Printed Date: 29 September 2024 at 4:50pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: GDI leak in CXTPPopupControl
Posted By: AlxB
Subject: GDI leak in CXTPPopupControl
Date Posted: 12 February 2010 at 3:50am
Hi!
When I used pop-up control I've noticed a GDI resource leak in the function HRGN CXTPPopupControl::BitmapToRegion(CXTPImageManagerIcon* pIcon) file XTPPopupControl.cpp.

A handle that is created as:
HBITMAP hbm32 = CXTPImageManager::Create32BPPDIBSection(dcMemDC, nWidth, nHeight, &lpBits);
will be never freed later.

In my code I simply change "raw" HBITMAP into CBitmap class to solve this problem. I use version 12 and AFAIK it is not corrected in 13 version as well.

Thanks.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net