//CFileFind tempFind;
//char datapath[256]="c:\\temp";
//CString path;
//path =datapath;
//CString strFileName;
//int nCount=0;
//BOOL bIsFinded;
//bIsFinded = (BOOL)tempFind.FindFile( path );
//if(!bIsFinded)
//{
// AfxMessageBox(L"目录不存在!");
// //return;
//}
//path += "\\*.*";
//bIsFinded = (BOOL)tempFind.FindFile( path );
//while( bIsFinded )
//{
// bIsFinded = (BOOL)tempFind.FindNextFile();
// if( !tempFind.IsDots() )
// {
//
// //每次得到一个文件名
// strFileName = tempFind.GetFileName();
// CString szExtName;
// szExtName=strFileName.Mid(strFileName.ReverseFind('.')+1);
// if (szExtName == "ttf"||szExtName == "TTF")
// {
// //strFileName = tempFind.GetFileTitle();
// //MessageBox(strFileName,L"hh");
// m_combobox1.InsertString( nCount, tempFind.GetFileTitle());
// nCount++;
// }
//
//
// }
//}
//tempFind.Close();
以上是怎么查找一个文件夹下的所有文件
//一下是调用填充字体
m_combobox1.ResetContent ();//m_combobox1下拉列表的变量
CClientDC dc (this);
::EnumFontFamilies ((HDC) dc, NULL, (FONTENUMPROC) EnumFontFamProc,(LPARAM) this);
//********************用windows字体填充下拉列表*************8***
int CALLBACK cmydialog5::EnumFontFamProc (ENUMLOGFONT* lpelf,
NEWTEXTMETRIC* lpntm, int nFontType, LPARAM lParam)
{
cmydialog5* pWnd = (cmydialog5*) lParam;
if ((nFontType & TRUETYPE_FONTTYPE))
pWnd->m_combobox1.AddString (lpelf->elfLogFont.lfFaceName);
return 1;