Choose.cpp
资源名称:POP3SMTP.rar [点击查看]
上传用户:pyhyhg
上传日期:2022-08-11
资源大小:56k
文件大小:2k
源码类别:
Email客户端
开发平台:
Visual C++
- // Choose.cpp : implementation file
- //
- #include "stdafx.h"
- #include "POP3SMTP.h"
- #include "POP3SMTPDlg.h"
- #include "ViewDlg.h"
- #include "Choose.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CChooseDlg dialog
- CChooseDlg::CChooseDlg(CWnd* pParent /*=NULL*/)
- : CDialog(CChooseDlg::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CChooseDlg)
- // NOTE: the ClassWizard will add member initialization here
- //}}AFX_DATA_INIT
- }
- void CChooseDlg::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CChooseDlg)
- DDX_Control(pDX, IDC_COMBO1, m_list);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CChooseDlg, CDialog)
- //{{AFX_MSG_MAP(CChooseDlg)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CChooseDlg message handlers
- void CChooseDlg::AddToList(CString s)
- {
- m_list.AddString((LPCSTR)s);
- }
- BOOL CChooseDlg::OnInitDialog()
- {
- CDialog::OnInitDialog();
- // TODO: Add extra initialization here
- CPOP3SMTPDlg* par;
- par=(CPOP3SMTPDlg*)GetParent(); //get parent to obtain messages infos
- for(int i=0;i<par->pop3.GetRetrMsgNum();i++)
- {
- AddToList(par->pop3.GetMsgSubject(i));
- }
- m_list.SetCurSel(0);
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }
- void CChooseDlg::OnOK()
- {
- // TODO: Add your control notification handler code here
- CPOP3SMTPDlg* par;
- par=(CPOP3SMTPDlg*)GetParent();
- CViewDlg dlg;
- //get msg stuff and body and show it
- dlg.m_text=par->pop3.GetMsgStuff(m_list.GetCurSel());
- dlg.m_text+=par->pop3.GetMsgBody(m_list.GetCurSel());
- dlg.DoModal();
- //CDialog::OnOK();
- }