PageMail.cpp
资源名称:Netmanag.zip [点击查看]
上传用户:geanq888
上传日期:2007-01-03
资源大小:316k
文件大小:2k
源码类别:
Ftp客户端
开发平台:
Visual C++
- // PageMail.cpp : implementation file
- //
- #include "stdafx.h"
- #include "NetManager.h"
- #include "PageMail.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CPageMail property page
- IMPLEMENT_DYNCREATE(CPageMail, CPropertyPage)
- CPageMail::CPageMail() : CPropertyPage(CPageMail::IDD)
- {
- //{{AFX_DATA_INIT(CPageMail)
- //}}AFX_DATA_INIT
- m_pPropSheet = new CPropertySheet;
- }
- CPageMail::~CPageMail()
- {
- }
- void CPageMail::DoDataExchange(CDataExchange* pDX)
- {
- CPropertyPage::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CPageMail)
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CPageMail, CPropertyPage)
- //{{AFX_MSG_MAP(CPageMail)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CPageMail message handlers
- BOOL CPageMail::OnInitDialog()
- {
- CPropertyPage::OnInitDialog();
- m_pPropSheet->AddPage(&m_PageMailPop3);
- m_pPropSheet->AddPage(&m_PageMailSmtp);
- m_pPropSheet->Create(this, WS_CHILD | WS_VISIBLE | WS_TABSTOP, WS_EX_CONTROLPARENT);
- m_ImagesTab.Create(16, 16, ILC_COLOR32 | ILC_MASK, 2, 0);
- m_ImagesTab.Add(AfxGetApp()->LoadIcon(IDI_POP3));
- m_ImagesTab.Add(AfxGetApp()->LoadIcon(IDI_SMTP));
- m_pPropSheet->GetTabControl()->SetImageList(&m_ImagesTab);
- TC_ITEM TabCtrlItem;
- TabCtrlItem.mask = TCIF_IMAGE;
- TabCtrlItem.iImage = 0;
- m_pPropSheet->GetTabControl()->SetItem(0, &TabCtrlItem);
- TabCtrlItem.iImage = 1;
- m_pPropSheet->GetTabControl()->SetItem(1, &TabCtrlItem);
- CRect rcSheet;
- GetClientRect(&rcSheet);
- m_pPropSheet->SetWindowPos(NULL, rcSheet.left - 4, rcSheet.top - 1, rcSheet.Width(), rcSheet.Height(),
- SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE);
- m_pPropSheet->SetActivePage(1);
- m_pPropSheet->SetActivePage(0);
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }
- /////////////////////////////////////////////////////////////////////////////