Dec 112017
 
C++ example for browsing dBASE compatible database using CodeBase library.
File VLIST.ZIP from The Programmer’s Corner in
Category C++ Source Code
C++ example for browsing dBASE compatible database using CodeBase library.
File Name File Size Zip Size Zip Type
BROWSE.CPP 5862 1778 deflated
BROWSE.HPP 812 444 deflated
COMMANDS.HPP 1483 489 deflated
DEMO.CPP 5573 1712 deflated
DEMO.DBF 28474 1931 deflated
DEMO.HPP 1039 526 deflated
DEMO.MDX 16384 2618 deflated
DEMONDX.CPP 1741 732 deflated
DEMONDX.HPP 421 294 deflated
EDIT.CPP 13259 2370 deflated
EDIT.HPP 1871 684 deflated
FORMATLN.CPP 8069 2020 deflated
FORMATLN.HPP 2268 613 deflated
GADGETS.CPP 2940 895 deflated
GADGETS.HPP 1037 353 deflated
READ.ME 2129 1093 deflated
SEARCH.CPP 2040 792 deflated
SEARCH.HPP 525 332 deflated
STRUCTS.HPP 366 226 deflated
VLIST.DSK 2829 1083 deflated
VLIST.EXE 283168 114329 deflated
VLIST.PRJ 9643 2325 deflated
VLISTBOX.CPP 3108 1021 deflated
VLISTBOX.HPP 848 494 deflated

Download File VLIST.ZIP Here

Contents of the READ.ME file


7-3-92

Because of the many responses to the previous version of the virtual listbox
demo, and also because of this old dog learning some new tricks, I have put
together this new and (hopefully) improved version.

NEW WITH THIS RELEASE
1.Since the sample database is so small (300+ records) the VListBox class
uses shorts this time for the GetText function. This will also make it
quicker for you to implement in your own code, since you won't need to
modify TV.LIB and all class derived from TListViewer (of which there are
many!) to accomodate longs.

Please bear in mind, however if you need to create a virtual list with
potentially more items than a short will tolerate, you will need to make
the change.

Also note that the listbox does not "own" the database class any longer.
The listbox is passed the address to the database, and it is accessed
through a "pointer to a pointer." This is also the case with the Edit
dialog box.

2.I have added a simple search function to the browse window. You can
search by record number when the index is not specified, or by last
name if the index is selected.

3.The Edit dialog box (accessed by pressing "Enter" on the focused item of
the listbox) now allows for the comparison, editing, deleting, and restor-
ing of two separate records.

4.The basic concept behind the virtual list box is quite simple. TListViewer
draws the list, and when it does it calls GetText(char *dest, short item,...). Draw()
wants a string back, preferably the string associated with that item in
some list. What you put in that string is up to you. How you get the
string is also up to you, as is keeping track of where you are in the list.


In the zip file are all the .CPP and .HPP files used to build the demo.
However, since the database used is a dBase file, accessed through CodeBase++,
you will not be able to compile the examples unless you have the CodeBase++
libraries.

If you have any questions, please feel free to leave me a message or call me
directly.

Gregory K. Miskin
(801) 226-3142



 December 11, 2017  Add comments

Leave a Reply