2500 item in list control
Hi all,
I have made a dialog based application in vc2008, in that application i have created a list control. In that list control i am displaying file names from a particular folder......
suppose folder contains 2500 files and allfiles are bmp type, i am also displaying system icon(which is picked up from system at runtime only) in front of every file.
Now the problem is as soon as i click on adding file to my list control only border of my list ctrl is displyed and everything becomes white and after some time not responding status is being shown and after some time application crashes. i have monitored its memory usage from task manager it exceeds very fast and its very high...
i am not getting how to resolve it and infact what exactly the problem is...
can anybody help me in this....
Re: 2500 item in list control
Youre possibly running into the limit of GDI Handles. There are only some 10000 available and an icon uses 4 as far as I remember.
Check with taskmanager.
Kurt
Re: 2500 item in list control
The debugger would be a good place to start.
Re: 2500 item in list control
Quote:
suppose folder contains 2500 files ...
Yeah, and this exactly is a situation when virtual list enters the scene... This is crazy to stuff all 2500 items in the poor control.
Re: 2500 item in list control
Quote:
Originally Posted by
VCProgrammer
Hi all,
I have made a dialog based application in vc2008, in that application i have created a list control. In that list control i am displaying file names from a particular folder......
suppose folder contains 2500 files and allfiles are bmp type, i am also displaying system icon(which is picked up from system at runtime only) in front of every file.
Now the problem is as soon as i click on adding file to my list control only border of my list ctrl is displyed and everything becomes white and after some time not responding status is being shown and after some time application crashes. i have monitored its memory usage from task manager it exceeds very fast and its very high...
i am not getting how to resolve it and infact what exactly the problem is...
can anybody help me in this....
As Igor said, a virtual list should probably fix this.
http://msdn.microsoft.com/en-us/library/ye4z8x58.aspx