?? 編輯框控件在程序初始化時注入一個文本文件的內容.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 + -