PageMailConfig.cpp
资源名称:Netmanag.zip [点击查看]
上传用户:geanq888
上传日期:2007-01-03
资源大小:316k
文件大小:2k
源码类别:
Ftp客户端
开发平台:
Visual C++
- // PageMailConfig.cpp : implementation file
- //
- #include "stdafx.h"
- #include "NetManager.h"
- #include "PageMail.h"
- #include "PageMailConfig.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CPageMailConfig dialog
- CPageMailConfig::CPageMailConfig(CWnd* pParent /*=NULL*/)
- : CDialog(CPageMailConfig::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CPageMailConfig)
- m_sSignature = _T("");
- m_sServer = _T("");
- m_sXMailer = _T("");
- //}}AFX_DATA_INIT
- }
- void CPageMailConfig::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CPageMailConfig)
- DDX_Control(pDX, IDC_TEXT_SIGNATURE, m_Signature);
- DDX_Text(pDX, IDC_TEXT_SIGNATURE, m_sSignature);
- DDX_Text(pDX, IDC_SERVER, m_sServer);
- DDX_Text(pDX, IDC_XMAILER, m_sXMailer);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CPageMailConfig, CDialog)
- //{{AFX_MSG_MAP(CPageMailConfig)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CPageMailConfig message handlers
- void CPageMailConfig::OnOK()
- {
- UpdateData();
- CDialog::OnOK();
- }
- /////////////////////////////////////////////////////////////////////////////
- BOOL CPageMailConfig::OnInitDialog()
- {
- CDialog::OnInitDialog();
- m_ToolTip.Create(this);
- m_ToolTip.Activate(TRUE);
- CWnd* pWnd = GetWindow(GW_CHILD);
- while(pWnd)
- {
- int nID = pWnd->GetDlgCtrlID();
- if (nID != -1)
- m_ToolTip.AddTool(pWnd, pWnd->GetDlgCtrlID());
- pWnd = pWnd->GetWindow(GW_HWNDNEXT);
- }
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }
- /////////////////////////////////////////////////////////////////////////////
- BOOL CPageMailConfig::PreTranslateMessage(MSG* pMsg)
- {
- // transate the message based on TTM_WINDOWFROMPOINT
- MSG msg = *pMsg;
- msg.hwnd = (HWND)m_ToolTip.SendMessage(TTM_WINDOWFROMPOINT, 0, (LPARAM)&msg.pt);
- CPoint pt = pMsg->pt;
- if (msg.message >= WM_MOUSEFIRST && msg.message <= WM_MOUSELAST)
- ::ScreenToClient(msg.hwnd, &pt);
- msg.lParam = MAKELONG(pt.x, pt.y);
- // Let the ToolTip process this message.
- m_ToolTip.RelayEvent(&msg);
- return CDialog::PreTranslateMessage(pMsg);
- }
- /////////////////////////////////////////////////////////////////////////////