Here is the code that gets the list of files with WININET functions
Code:
void CSimpleftpclientDlg::OnButton3()
{
HANDLE hFind;
WIN32_FIND_DATA findData;
strcat(data,"");
hFind = FtpFindFirstFile(hIConnect, NULL, &findData,INTERNET_FLAG_NEED_FILE,NULL);
if (hFind != INVALID_HANDLE_VALUE) {
while (InternetFindNextFile(hFind, &findData)){
strcat(data,findData.cFileName);
strcat(data,"\r\n");
} }
m_dir.AddString(data);
}
the code is a button..it works, but all the filenames are on the same line in the list box..how can I put them on their own line