文件名称:vc21487899244
- 所属分类:
- 文档资料
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 40kb
- 下载次数:
- 0次
- 提 供 者:
- HUGH *****
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
主要源码:
void CFDlg::OnChangeEdit1()
{
UpdateData()
m_strExt.MakeUpper()
m_list.ResetContent()
if(m_strExt.GetLength()==0) return
CStdioFile sf
if(sf.Open("FileExt.txt",Cfile::modeRead))
{
CString strTemp,strOut
while(sf.ReadString(strTemp))
{
if(strTemp.Left(m_strExt.GetLength()) ==m_strExt)
{
m_list.AddString(strTemp)
}
}
}
sf.Close()
m_list.SetCurSel(0)
this->OnSelchangeList2()
}
void CFDlg::OnSelchangeList2()
{
CString strTemp,strExt
m_list.GetText(m_list.GetCurSel(),strTemp)
strExt=strTemp.Left(strTemp.FindOneOf(" ")) //MessageBox(strExt)
CString strFileName ="eee."+strExt //MessageBox(strFileName)
SHFILEINFO shfi
memset(&shfi,0,sizeof(shfi)) //或者ZeroMemory(&shfi,sizeof(shfi))
::SHGetFileInfo(strFileName,
FILE_ATTRIBUTE_NORMAL,
&shfi,
sizeof(shfi),
SHGFI_ICON|SHGFI_USEFILEATTRIBUTES)
m_icon.SetIcon(shfi.hIcon)
}-Main source: void CFDlg:: OnChangeEdit1 () (UpdateData () m_strExt.MakeUpper () m_list.ResetContent () if (m_strExt.GetLength () == 0) return CStdioFile sf if (sf.Open (FileExt.txt, Cfile :: modeRead)) (CString strTemp, strOut while (sf.ReadString (strTemp)) (if (strTemp.Left (m_strExt.GetLength ()) == m_strExt) (m_list.AddString (strTemp)))) sf.Close ( ) m_list.SetCurSel (0) this-
void CFDlg::OnChangeEdit1()
{
UpdateData()
m_strExt.MakeUpper()
m_list.ResetContent()
if(m_strExt.GetLength()==0) return
CStdioFile sf
if(sf.Open("FileExt.txt",Cfile::modeRead))
{
CString strTemp,strOut
while(sf.ReadString(strTemp))
{
if(strTemp.Left(m_strExt.GetLength()) ==m_strExt)
{
m_list.AddString(strTemp)
}
}
}
sf.Close()
m_list.SetCurSel(0)
this->OnSelchangeList2()
}
void CFDlg::OnSelchangeList2()
{
CString strTemp,strExt
m_list.GetText(m_list.GetCurSel(),strTemp)
strExt=strTemp.Left(strTemp.FindOneOf(" ")) //MessageBox(strExt)
CString strFileName ="eee."+strExt //MessageBox(strFileName)
SHFILEINFO shfi
memset(&shfi,0,sizeof(shfi)) //或者ZeroMemory(&shfi,sizeof(shfi))
::SHGetFileInfo(strFileName,
FILE_ATTRIBUTE_NORMAL,
&shfi,
sizeof(shfi),
SHGFI_ICON|SHGFI_USEFILEATTRIBUTES)
m_icon.SetIcon(shfi.hIcon)
}-Main source: void CFDlg:: OnChangeEdit1 () (UpdateData () m_strExt.MakeUpper () m_list.ResetContent () if (m_strExt.GetLength () == 0) return CStdioFile sf if (sf.Open (FileExt.txt, Cfile :: modeRead)) (CString strTemp, strOut while (sf.ReadString (strTemp)) (if (strTemp.Left (m_strExt.GetLength ()) == m_strExt) (m_list.AddString (strTemp)))) sf.Close ( ) m_list.SetCurSel (0) this-
(系统自动生成,下载前可以参看下载内容)
下载文件列表
......................\F.APS
......................\F.clw
......................\F.cpp
......................\F.dsp
......................\F.dsw
......................\F.h
......................\F.rc
......................\FDlg.cpp
......................\FDlg.h
......................\FileExt.txt
......................\res
......................\...\F.rc2
......................\Resource.h
......................\StdAfx.cpp
......................\StdAfx.h
......................\下载说明.htm
......................\查询扩展名.exe
......................\F.clw
......................\F.cpp
......................\F.dsp
......................\F.dsw
......................\F.h
......................\F.rc
......................\FDlg.cpp
......................\FDlg.h
......................\FileExt.txt
......................\res
......................\...\F.rc2
......................\Resource.h
......................\StdAfx.cpp
......................\StdAfx.h
......................\下载说明.htm
......................\查询扩展名.exe