⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 编辑框控件在程序初始化时注入一个文本文件的内容.txt

📁 vc开发的PCI总线加密卡 PCI开发卡主要由PCI9054、93C56、16M晶振和相应的跳线、控制地址数据线等部分组成。PCI9054是PLX公司的PCI主模式桥芯片
💻 TXT
字号:
编辑框控件在程序初始化时注入一个文本文件的内容
 
2003-4-23 12:47:33   VCTOP      阅读次数: 19274 
编辑框控件在程序初始化时注入一个文本文件的内容

在头文件中加入CString m_LANINFO; 

BOOL CMyDlg::OnInitDialog() 
{ 
CDialog::OnInitDialog(); 

CFile f; 
if ( f.Open("F:\\PUBLIC\\laninfo.dat", CFile::modeRead)== 
FALSE ) 
return; 

//Creare an archive odject 
CArchive ar( &f, CArchive::load ); 

//Serialzie data from the archive into m_NumbersEdit 
ar >> m_LANINFO; 

//Close the archive 
ar.Close(); 

//Close the file. 
f.Close(); 

m_EditControl.SetWindowText (m_LANINFO); // Do it the direct way. 
return TRUE; 
// return TRUE unless you set the focus to a control 

// EXCEPTION: OCX Property Pages should return FALSE 
} 
 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -