How do you get all the files selected in a list box? i have created a list box like so;
ClientFilesLST = CreateWindowEx(WS_EX_TOPMOST|WS_EX_STATICEDGE,"Lis tBox","",LBS_MULTIPLESEL | LBS_NOTIFY | WS_BORDER | WS_CHILD | WS_VISIBLE, 0, 0, 0, 0, hWnd,(HMENU)IDL_CLFLS,g_hInst,0);
and i tried this to get the selected files
a = SendMessage (ClientFilesLST, LB_GETSEL, 0, 0);
SendMessage (ClientFilesLST, LB_GETTEXT, a, (LPARAM) ClientFileName);
but it seems to only get the last selected file, so i thought i might need an array to hold all the files in, but by brain doesn't seem to be working and im in a big hurry here. Thanks Heaps everyone.
int which_files; //For a maximum of 10 selections
a = SendMessage (ClientFilesLST, LB_GETSELCOUNT, 0, 0);
SendMessage (ClientFilesLST, LB_GETSELITEMS, a, (LPARAM) which_files);
This gives you the items selected.