📄 resorgexpireddlg.cpp
字号:
/************************************************************************
*
* Resource ID Organiser Utility Library
*
* (c) Copyright 2001 by Andy Metcalfe (andy.metcalfe@lineone.net)
* All rights reserved.
*
************************************************************************
*
* Filename : ResOrgExpiredDlg.cpp
*
* Description : CResOrgExpiredDlg - "Version Expired" dialog class
*
* Compiler : Microsoft Visual C++ 6.0, Service Pack 3 or 4
*
* Target
* Environment : Windows 98/NT
*
* NOTE:
*
* This software is provided "as is" free for personal use. All
* title and copyrights in and to the software, including but not
* limited to any images, text, etc. incorporated into it, are
* owned by Andy Metcalfe, except where acknowledged otherwise.
*
* Your may freely to use this code in your own products, PROVIDED
* this notice is not removed or modified.
*
*
* Visit http://www.resorg.co.uk for latest updates
*
************************************************************************
*
* MODIFICATION HISTORY:
*
* This is a controlled document. See project configuration
* control tool for latest version and full version history.
*
* $Archive: /Projects/AddIns/ResOrg/ResOrgUtils/ResOrgExpiredDlg.cpp $
* $Revision: 1 $
* $Date: 5/04/01 6:11 $
* $Author: Andy $
*
* $History: ResOrgExpiredDlg.cpp $
*
* ***************** Version 1 *****************
* User: Andy Date: 5/04/01 Time: 6:11
* Created in $/Projects/AddIns/ResOrg/ResOrgUtils
*
* $Nokeywords: $
*
************************************************************************/
// ResOrgExpiredDlg.cpp : implementation file
//
#include "StdAfx.h"
#include "ResOrgUtils_Priv.h"
#include "ResOrgExpiredDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CResOrgExpiredDlg dialog
CResOrgExpiredDlg::CResOrgExpiredDlg(CWnd* pParent /*=NULL*/)
: CResOrgExpiredDlg_BASE(CResOrgExpiredDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CResOrgExpiredDlg)
m_sWebsite = _T("http://www.resorg.co.uk");
m_sMailTo = _T("andy.metcalfe@lineone.net");
//}}AFX_DATA_INIT
}
void CResOrgExpiredDlg::DoDataExchange(CDataExchange* pDX)
{
CResOrgExpiredDlg_BASE::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CResOrgExpiredDlg)
DDX_Text(pDX, IDC_RESORG_WEBSITE, m_sWebsite);
DDX_Control(pDX, IDC_RESORG_WEBSITE, m_ctrlWebsite);
DDX_Text(pDX, IDC_RESORG_MAILTO, m_sMailTo);
DDX_Control(pDX, IDC_RESORG_MAILTO, m_ctrlEmail);
DDX_Control(pDX, IDC_RESORG_WARNING, m_ctrlWarningIcon);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CResOrgExpiredDlg, CResOrgExpiredDlg_BASE)
//{{AFX_MSG_MAP(CResOrgExpiredDlg)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/******************************************************************************
* Called when the dialog is created
*
******************************************************************************/
BOOL CResOrgExpiredDlg::OnInitDialog(void)
{
CResOrgExpiredDlg_BASE::OnInitDialog(); // returns TRUE unless you set the focus to a control
m_ctrlWarningIcon.SetIcon( ::AfxGetApp()->LoadStandardIcon(IDI_WARNING) );
// Initialise the URL links
if (!m_sWebsite.IsEmpty())
{
m_ctrlWebsite.SetURL(m_sWebsite);
}
if (!m_sMailTo.IsEmpty())
{
// Read the fields we need from the version resource
// If any can't be found, they will be blank
CNGModuleVersion ver;
ver.GetFileVersionInfo();
CString sTitle = ver.GetValue( _T("FileDescription") );
CString sFileVersion = ver.GetValue( _T("FileVersion") );
// Makeup URL including subject as app name/version
CString sSubject = sTitle +
_T(" version ") +
sFileVersion +
_T(" expired");
CString sEmailURL = _T("mailto:") +
m_sMailTo +
_T("?Subject=") +
sSubject;
m_ctrlEmail.SetURL( _T("mailto:") + sEmailURL);
}
UpdateData(FALSE);
return TRUE; // Return TRUE unless you set the focus to a control
}
/////////////////////////////////////////////////////////////////////////////
// CResOrgExpiredDlg message handlers
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -