🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.misc
Article #44

Re: **Huge data listbox

#44
From: Cedric Sims
Date: Wed, 28 Oct 1992 15:00
43 lines
2623 bytes
In article <=s4pb8l@microsoft.com> Kyle Marsh <kylemar@microsoft.com> writes:
>An ownerdraw list box without the LBS_HASSTRINGS style can store 8160 
>items. The reason for this odd number is described in detail in:
>\vendors\microsoft\developer-network\win\13.zip on ftp.uu.net. Download 
>index.zip for a complete list of the articles available.
>
>You can use the owner draw technique for a list box up to 8160 items. 
>The owner draw part can be very simple since all you need to do is 
>TextOut the string you have stored. If you need more items then that 
>you will need to implement a virtual list box. I am finishing up an 
>article on how to do this. As soon as it is ready it will go up on 
>ftp.uu.net as well.
>
>Kyle
>MS Developer Network

I was a little rash in thinking I was trying to do the impossible.
First, I want to thank everyone that replied. You guys are really
helpful. Okay, until Kyle finishes his virtual list box example,
this is what is needed to handle a large list box...

1. Create an owner-draw listbox...
2. Do LB_ADDSTRING with lParam containing an index or pointer value.
3. Respond to WM_DRAWITEM with TextOut of the repective index....

I don't know why I didn't see this before, but this is briefly covered
in the Guide to Programming (in the SDK) and more detailed info is in
the Reference Guides (also in the SDK).

Good luck, and thanks to all,
Cedrico.
-------------------------------------------------------------------
 Cedric J. Sims                               Texas A&M University
                                         Computing Services Center
 cedrics@tamu.edu                          (SELL)  Room 216 Teague
 +1 409 862 4104                    College Station, Tx 77843-3142
-------------------------------------------------------------------

-- 
-------------------------------------------------------------------
 Cedric J. Sims                               Texas A&M University
                                         Computing Services Center
 cedrics@tamu.edu                          (SELL)  Room 216 Teague
Technical Details
Message-ID: <1992Oct28.150047.1791@tamsun.tamu.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!darwin.sura.net!spool.mu.edu!think.com!ames!sun-barr!cs.utexas.edu!tamsun.tamu.edu!c2s4027
References: <=s4pb8l@microsoft.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.misc
Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!darwin.sura.net!spool.mu.edu!think.com!ames!sun-barr!cs.utexas.edu!tamsun.tamu.edu!c2s4027
From: c2s4027@tamsun.tamu.edu (Cedric Sims)
Subject: Re: **Huge data listbox                                                            
Message-ID: <1992Oct28.150047.1791@tamsun.tamu.edu>
Organization: Texas A&M University, College Station
References: <=s4pb8l@microsoft.com>
Date: Wed, 28 Oct 1992 15:00:47 GMT
Lines: 43