PageMailDelCurrent.cpp
资源名称:Netmanag.zip [点击查看]
上传用户:geanq888
上传日期:2007-01-03
资源大小:316k
文件大小:2k
源码类别:
Ftp客户端
开发平台:
Visual C++
- // PageMailDelCurrent.cpp : implementation file
- //
- #include "stdafx.h"
- #include "netmanager.h"
- #include "PageMailDelCurrent.h"
- #include "GlobalsExtern.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CPageMailDelCurrent
- CPageMailDelCurrent::CPageMailDelCurrent()
- {
- }
- CPageMailDelCurrent::~CPageMailDelCurrent()
- {
- }
- BEGIN_MESSAGE_MAP(CPageMailDelCurrent, CButton)
- //{{AFX_MSG_MAP(CPageMailDelCurrent)
- ON_CONTROL_REFLECT(BN_CLICKED, OnClicked)
- ON_WM_SETFOCUS()
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CPageMailDelCurrent message handlers
- void CPageMailDelCurrent::OnClicked()
- {
- UpdateData();
- CWnd* pCurrent = m_pOldFocus->GetOwner();
- int nCurrent = pCurrent->GetDlgCtrlID();
- if(nCurrent == IDC_FROM
- || nCurrent == IDC_TO
- || nCurrent == IDC_SERVER
- || nCurrent == IDC_SUBJECT
- || nCurrent == IDC_XMAILER
- || nCurrent == IDC_ATTACHMENTS
- )
- {
- if(MessageBox("Remove this item???", NULL, MB_ICONQUESTION | MB_YESNO) == IDYES)
- {
- CString sCurrent;
- pCurrent->GetWindowText(sCurrent);
- int nCurrent = ((CComboBox*)pCurrent)->FindStringExact(0, sCurrent);
- if(nCurrent != CB_ERR)
- if(((CComboBox*)pCurrent)->DeleteString(nCurrent) != CB_ERR)
- {
- g_WriteToHistory(TRUE, "[Mail] Removed " + sCurrent);
- pCurrent->SetWindowText("");
- }
- }
- pCurrent->SetFocus();
- }
- }
- /////////////////////////////////////////////////////////////////////////////
- void CPageMailDelCurrent::OnSetFocus(CWnd* pOldWnd)
- {
- CButton::OnSetFocus(pOldWnd);
- m_pOldFocus = pOldWnd;
- }