Re: get text from listbox
- From: "Thorsten Albers" <albersRE@xxxxxxxxxxxxxxxxxxx>
- Date: Sat, 03 Dec 2005 07:15:51 -0800
RB Smissaert <bartsmissaert@xxxxxxxxxxxxxxxx> schrieb im Beitrag
<#d7HfmA#FHA.3804@xxxxxxxxxxxxxxxxxxxx>...
> Did you mean coincidence to get some readable data out?
Yes. Either the item data is a pointer to the respective database data or
it is a value which, used as if it were a pointer, by coincidence points
somewhere to the database data. What you have written below (no coherence
of list item and dumped data) lets me assume that in fact >it is a
coincidence<.
> The data in the database has very similar lenghts for the different rows
as
> there are maximum number of characters for the text items (60 or 200) and
> the dates are all in the
> form yyyymmdd.
> The differences in the numerical pData output for the different items is
> just too big to be explained by length of data in the database.
This IMHO makes it even more likely that the item data value >is not< a
pointer to the database data. Otherwise the differences could be explained
only, if the list displays only part of the database data with varring
amounts of undisplayed database records between displayed records.
List item Database record
0 0 displayed
1 not displayed
1 2 displayed
2 3 displayed
4 not displayed
5 not displayed
6 not displayed
3 7 displayed
->
pData(1) - pData(0) = record length * 2
pData(2) - pData(1) = record length * 1
pData(3) - pData(2) = record length * 4
> Another thing that is puzzling is that I can see no logical relation
between
> the chosen listbox item and the output and
> I don't think that doing:
> pData = SendMessage(hWnd, LB_GETITEMDATA, ByVal CLng(iIndex), 0&)
That's a pity; again: IMHO the item data values aren't >pointers< to the
respective database data.
> Has a direct influence as to what listbox item you get.
> Sometimes I get data that just can't be in the listbox such as patient's
> address data and also SQL strings, so I am still
> far from having an insight in how this all works.
Remember what I have said in an earlier posting of mine: As I understand
you, you are doing a database research or report; the result of this is
displayed in the ListBox. If so, the item data presumably will >not< refer
to the original tables of the database but to the table entries of a
temporary table which has been created for the research or report and which
presumably only holds a collection of some of the database records, not of
all.
Database table
ID Contents
1 hwdhu
2 mxssm
3 etztwe
4 uyuxxu
5 qwqxbb
6 982mm3
7 pouioi
8 xxxgsg
-> Show me all table entries with 'x'
-> Temporary table
Temporary ID ID Contents
1 2 mxssm
2 4 uyuxxu
3 5 qwqxbb
4 8 xxxgsg
Here I would expect the 'temporary ID' (table index number or something
alike) to be used as the ListBox item data value, >not< the original ID.
> Not sure what you meant with that. What exactly should I make
hexadecimal?
> Thanks in any case for your assistance with this.
Instead of (just an example)
Y From Conversion
make it a hex dump like
0000: 59 03 12 00 20 46 72 6F 6D 20 43 6F 6E 76 65 72 Y... From Conver
0008: 73 69 6F 6E sion
--
----------------------------------------------------------------------
THORSTEN ALBERS Universität Freiburg
albers@
uni-freiburg.de
----------------------------------------------------------------------
.
- Follow-Ups:
- Re: get text from listbox
- From: RB Smissaert
- Re: get text from listbox
- References:
- get text from listbox
- From: RB Smissaert
- Re: get text from listbox
- From: Karl E. Peterson
- Re: get text from listbox
- From: RB Smissaert
- Re: get text from listbox
- From: Karl E. Peterson
- Re: get text from listbox
- From: Juergen Thuemmler
- Re: get text from listbox
- From: Karl E. Peterson
- Re: get text from listbox
- From: mscir
- Re: get text from listbox
- From: RB Smissaert
- Re: get text from listbox
- From: Thorsten Albers
- Re: get text from listbox
- From: RB Smissaert
- Re: get text from listbox
- From: Thorsten Albers
- Re: get text from listbox
- From: RB Smissaert
- Re: get text from listbox
- From: Thorsten Albers
- Re: get text from listbox
- From: RB Smissaert
- get text from listbox
- Prev by Date: Re: Detect Application Launch
- Next by Date: Re: get text from listbox
- Previous by thread: Re: get text from listbox
- Next by thread: Re: get text from listbox
- Index(es):
Relevant Pages
|