Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / September 2007

Tip: Looking for answers? Try searching our database.

Virtual ListBox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Derek Kuliński / takeda - 06 Sep 2007 08:05 GMT
Hi,

I have a problem, I hope someone will help me.
I'm writing a small emulator, and as I'm working on it I want to see its
internal memory the memory is from 0000 - FFFF (WORD) so that's 65536
bytes. I'm thinking to put 16 of them in one line, so that would make 4096
lines.
Adding the elements takes a lot of time, I read that anything bigger than
1k shouldn't be implemented that way.
I read about virtual ListBox. I found tutorial how to do it in VB
(http://www.vbaccelerator.com/home/NET/Code/Controls/ListBox_and_ComboBox/VListBo
x/article.asp
),
but looks like my knowledge is too small to do the conversion to C++.
I learned that Microsoft made it relatively easy to do it with ListView
(http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=191033&SiteID=1),
but I cannot find similar methods and properties in ListBox.
While I was experimenting I managed to add DrawItemEvent and made it almost
do what I wanted, but the problem is that I can't fake the number of
elements in the list (I didn't find a way). I don't want to use the most
obvious one (adding 4096) elements because it will make the start pretty
long and will consume unnecessary memory. Also I'm pretty sure that's not
recommended practice...

Any hints?
Signature

ダレック

Ben Voigt [C++ MVP] - 10 Sep 2007 14:58 GMT
> Hi,
>
[quoted text clipped - 18 lines]
> long and will consume unnecessary memory. Also I'm pretty sure that's not
> recommended practice...

The article you showed uses LB_SETCOUNT for that.  It's specifically
designed for LBS_NODATA listboxes.

> Any hints?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.