>hi,
>
[quoted text clipped - 4 lines]
>thus how can i pick up the content of the list box from the top to the
>bottom?
In C, Something like:
#include <windows.h>
#include <stdlib.h>
#include <stdio.h>
int SevListBoxList(HWND hlist)
{
TCHAR strval[MAX_LBOX_LEN+1];
int i, c = (int)SendMessage(hlist, LB_GETCOUNT, 0, 0);
for (i=0; i<c; i++) {
if ((int)SendMessage(hlist, LB_GETTEXTLEN, i) <= MAX_LBOX_LEN) {
SendMessage(hlist, LB_GETTEXT, i, strval);
printf("%d: %s\n", i, strval);
} else
printf("%d: (STRING TOO LONG)\n", i);
}
return i;
}
Using MFC/CListBox, I suppose it would be something like
#include <windows.h>
#include <iostream>
int SevCListBoxList(CListBox *plist)
{
CString strval;
int i, c = plist->GetCount();
for (i=0; i<c; i++) {
plist->GetText(i, strval);
cout << i << ": " << strval << endl;
}
return i;
}
--
Sev