怎样获取返回路径中的图片列表?解决方法

怎样获取返回路径中的图片列表?
显示新建了一个按钮了并且定一个了一个编辑框用来显示获取的路径,再定义了一个列表框用来显示路径下的图片列表,路径已经获取到了,但是列表里面该怎么显示啊?
BROWSEINFO bi; //创建BROWSEINFO结构体
TCHAR Buffer[128]="" ;
TCHAR FullPath[128]="" ;
bi.hwndOwner = m_hWnd; //窗口句柄
bi.pidlRoot = NULL;
bi.pszDisplayName = Buffer;
bi.lpszTitle = NULL;
bi.ulFlags = BIF_RETURNONLYFSDIRS; //只返回目录
bi.lpfn = NULL;
bi.lParam = 0;
bi.iImage= 0;
ITEMIDLIST* pidl = ::SHBrowseForFolder(&bi); //显示弹出窗口
::SHGetPathFromIDList(pidl,FullPath); //得到目录名路径
GetDlgItem(IDC_EDIT_PicPath)-> SetWindowText(FullPath); //显示路径

------解决方案--------------------
CString strFilter="所有支持文件(*.jpg,*.gif,*.bmp)|*.jpg;*.gif;*.bmp||*.*";
CFileDialog fdlg(TRUE,NULL,NULL,OFN_HIDEREADONLY,strFilter);
------解决方案--------------------
//列出一个文件夹下面所有的文件
char** CWebServerInfo::EnumFiles(const char *directory, int *count)
{
WIN32_FIND_DATA FindFileData;
HANDLE hFind;
char result[MAX_RESULT][MAX_PATH];
char **returnresult;
char pattern[MAX_PATH];
int i = 0, j;

// begin find
strcpy(pattern, directory);
strcat(pattern, "\\*.*");//返回所有文件,你可以改成你需要的类型
hFind = FindFirstFile(pattern, &FindFileData);

if (hFind == INVALID_HANDLE_VALUE) 
{
*count = 0;
return NULL;

else 
{
do
{
strcpy(result[i++], FindFileData.cFileName);
}
while (FindNextFile(hFind, &FindFileData) != 0);
}

// find end
FindClose(hFind);

// copy the result
returnresult = (char **)calloc(i, sizeof(char *));

for (j = 0; j < i; j++)
{
returnresult[j] = (char *)calloc(MAX_PATH, sizeof(char));
strcpy(returnresult[j], result[j]);
}

*count = i;
return returnresult;
}