THe result of this is nothing
Im not good at handling strings in array's but from the reference i've looked at this should work. I suspect the problem is in the last parameter of sendmessage, but have tried many combination and nothings worked!!

Code:
 num = SendMessage(hwndlist, LB_GETCOUNT, 0, 0);
char buffer[num];
                      for(i=0;i<num; i++){
                                     SendMessage(hwndlist,LB_GETTEXT, i,(LPARAM)buffer[i]);
                                     MessageBox (NULL, buffer , "message", 0);
                                     fputs(buffer, fp);
                                     fprintf(fp, "\n");
                                     }
Thanks for your help.