-
Listbox multi collum
Hey ppl,
I think this maybe asking a bit to much but i dont know to much about this area and i gotta learn ;)
I need to make a list box in this format:
#file1#20k#c:\windows #
#file2#5k#c:\ #
#file3#6k#c:\ #
#file4#25k#c:\program files#
So basically a multi collumed list box, listing all files and there info.
Can someone show me how to make one of these and also list all files and folders in the first collum. I think i can get the info on there size and location and then output it.
Thanks for any help you can give.
Cheers
TNT
-
Hi TNT;
im guessing your using the API here okay im also guessing your creating your list box as follows
controlLST = CreateWindowEx(WS_EX_TOPMOST|WS_EX_STATICEDGE,"Lis tBox","",LBS_MULTIPLESEL | LBS_NOTIFY | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL, 0, 0, 0, 0, hWnd,(HMENU)IDL_LBOX,g_hInst,0);
now all you need to do is add the text you want to set into the list box using
SendMessage (controlLST,LB_ADDSTRING, 0, (LPARAM) "text");
and with each SendMessage call your string will be added to the next collum in the list control. so what i would do if i were you would be to use findfirstfile() get its size, sprintf() it into a buf with any other details you want about the file, then sendmessage() that buf to the list control, set up a while loop using FindNextFile() and do the same thing with that.
i hope this helps.
-
Hey
Thanks, i phraphs didnt make my original post clear, i meant vertical collums not horizontal ones, i think i need a special type of control for this, but i cannot remember it. Thanks for your help
Cheers
TNT