🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #6727

Re: GDI and User Objects Overflow

#6727
From: Jonathan Benedicto
Date: Mon, 18 Apr 2005 14:51
17 lines
1670 bytes
"Mark Jacobs" <http://www.jacobsm.com/mjmsg.htm?mj@critical> wrote in 
message news:4263c64a$1@newsgroups.borland.com...
>I have an application that will display in a ListView a list of 
>files, and their associated icons. As I scroll long lists of files up 
>and down, the number of GDI and USER objects increases (according to 
>task manager) until the GDI overflows at 10,000 objects. Why doesn't 
>my code (or Windows) free up handles as it goes along? How can I 
>reprogram this to avoid the overflow? Here is the code :-

Why don't you use SHGetFileInfo to get a image list of the icons and 
to get the image index of the icon for each file.

That is how TurboPower's ShellShock works their controls.

HTH

Jonathan 
Technical Details
Message-ID: <4263c97c@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!fr.ip.ndsoftware.net!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <4263c64a$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,c7f7d55dbf4194d8
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Jonathan Benedicto" <incorrect@no.server>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <4263c64a$1@newsgroups.borland.com>
Subject: Re: GDI and User Objects Overflow
Date: Mon, 18 Apr 2005 10:51:42 -0400
Lines: 19
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 69.158.118.184
Message-ID: <4263c97c@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1113835900 69.158.118.184 (18 Apr 2005 07:51:40 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!fr.ip.ndsoftware.net!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail