-
March 21st, 2009, 06:38 AM
#1
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....
-
March 21st, 2009, 06:51 AM
#2
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
-
March 21st, 2009, 07:04 AM
#3
Re: 2500 item in list control
The debugger would be a good place to start.
-
March 25th, 2009, 05:50 PM
#4
Re: 2500 item in list control
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.
Best regards,
Igor
-
March 26th, 2009, 01:41 AM
#5
Re: 2500 item in list control
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|