about.cpp
来自「一个邮件客户端源代码,包括收发邮件,安排日程等很多内容」· C++ 代码 · 共 71 行
CPP
71 行
#include "stdafx.h"
#include "magic.h"
#include "About.h"
/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
//{{AFX_DATA_INIT(CAboutDlg)
//}}AFX_DATA_INIT
}
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAboutDlg)
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
//{{AFX_MSG_MAP(CAboutDlg)
ON_BN_CLICKED(ID_EMAIL, OnEmail)
ON_BN_CLICKED(ID_HOMEPAGE, OnHomepage)
ON_BN_CLICKED(ID_MAGIC, OnMagic)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
void CAboutDlg::OnEmail()
{
CString strCommand;
strCommand.LoadString( IDS_EMAIL );
if( (int) ShellExecute( NULL, _T("open"), strCommand, _T(""), _T(""), SW_NORMAL ) < 32 )
{
CString strMessage;
AfxFormatString1( strMessage, IDP_CANNOT_FOLLOW_THE_LINK_1, strCommand );
AfxMessageBox( strMessage, MB_ICONSTOP );
}
}
void CAboutDlg::OnHomepage()
{
CString strCommand;
strCommand.LoadString( IDS_URL_MY_HOMEPAGE );
if( (int) ShellExecute( NULL, _T("open"), strCommand, _T(""), _T(""), SW_NORMAL ) < 32 )
{
CString strMessage;
AfxFormatString1( strMessage, IDP_CANNOT_FOLLOW_THE_LINK_1, strCommand );
AfxMessageBox( strMessage, MB_ICONSTOP );
}
}
void CAboutDlg::OnMagic()
{
CString strCommand;
strCommand.LoadString( IDS_URL_MAGIC_HOMEPAGE );
if( (int) ShellExecute( NULL, _T("open"), strCommand, _T(""), _T(""), SW_NORMAL ) < 32 )
{
CString strMessage;
AfxFormatString1( strMessage, IDP_CANNOT_FOLLOW_THE_LINK_1, strCommand );
AfxMessageBox( strMessage, MB_ICONSTOP );
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?