liaotian.cpp
上传用户:huazhu2004
上传日期:2022-06-27
资源大小:1929k
文件大小:1k
- // liaotian.cpp : implementation file
- //
- #include "stdafx.h"
- #include "Test.h"
- #include "liaotian.h"
- #include <fstream.h>
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // Cliaotian dialog
- Cliaotian::Cliaotian(CWnd* pParent /*=NULL*/)
- : CDialog(Cliaotian::IDD, pParent)
- {
- //{{AFX_DATA_INIT(Cliaotian)
- m_liaotian = _T("");
- //}}AFX_DATA_INIT
- }
- void Cliaotian::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(Cliaotian)
- DDX_Text(pDX, IDC_EDIT1, m_liaotian);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(Cliaotian, CDialog)
- //{{AFX_MSG_MAP(Cliaotian)
- ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
- ON_BN_CLICKED(IDC_BUTTON2, Onxn)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // Cliaotian message handlers
- void Cliaotian::OnButton1()
- {
- // TODO: Add your control notification handler code here
- OnCancel();
- }
- void Cliaotian::Onxn()
- {
- // TODO: Add your control notification handler code he
- fstream out("1.txt",ios::out|ios::in);
- char str[100];
- while(out>>str)
- {
- m_liaotian+=str;
- m_liaotian+="rn";
- }
- UpdateData(FALSE);
- }