ViewDlg.cpp
资源名称:POP3SMTP.rar [点击查看]
上传用户:pyhyhg
上传日期:2022-08-11
资源大小:56k
文件大小:1k
源码类别:
Email客户端
开发平台:
Visual C++
- // ViewDlg.cpp : implementation file
- //
- #include "stdafx.h"
- #include "POP3SMTP.h"
- #include "ViewDlg.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CViewDlg dialog
- CViewDlg::CViewDlg(CWnd* pParent /*=NULL*/)
- : CDialog(CViewDlg::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CViewDlg)
- m_text = _T("");
- //}}AFX_DATA_INIT
- }
- void CViewDlg::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CViewDlg)
- DDX_Text(pDX, IDC_EDIT_TEXT, m_text);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CViewDlg, CDialog)
- //{{AFX_MSG_MAP(CViewDlg)
- ON_BN_CLICKED(IDC_BUTTON_SAVE, OnButtonSave)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CViewDlg message handlers
- void CViewDlg::OnButtonSave()
- {
- // TODO: Add your control notification handler code here
- CFileDialog dlg(FALSE);
- if(dlg.DoModal()==IDOK)
- {
- CFile file(dlg.GetPathName(),CFile::modeCreate | CFile::modeWrite | CFile::typeBinary);
- file.Write((LPCSTR)m_text,m_text.GetLength());
- file.Close();
- }
- }