#include "stdafx.h"
#include "AllSrvUI.h"
#include "DlgAbout.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
BEGIN_MESSAGE_MAP(CDlgAbout, CDialog)
END_MESSAGE_MAP()
CDlgAbout::CDlgAbout(CWnd* pParent)
: CDialog(CDlgAbout::IDD, pParent)
{
m_strDescription = _T("");
m_strVersion = _T("");
m_strProductID = _T("");
m_strCopyright = _T("");
m_strLegalWarning = _T("");
}
void CDlgAbout::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Text(pDX, IDC_DESCRIPTION, m_strDescription);
DDX_Text(pDX, IDC_VERSION, m_strVersion);
DDX_Text(pDX, IDC_PRODUCT_ID, m_strProductID);
DDX_Text(pDX, IDC_COPYRIGHT, m_strCopyright);
DDX_Text(pDX, IDC_LEGAL_WARNING, m_strLegalWarning);
}
BOOL CDlgAbout::OnInitDialog()
{
CDialog::OnInitDialog();
ZVersionInfo vi;
m_strDescription = vi.GetFileDescription();
m_strVersion = vi.GetFileVersionString();
m_strCopyright = vi.GetLegalCopyright();
CRegKey key;
if (ERROR_SUCCESS == key.Open(HKEY_LOCAL_MACHINE, HKLM_AllSrvUI, KEY_READ))
LoadRegString(key, TEXT("PID"), m_strProductID);
if (m_strProductID.IsEmpty())
m_strProductID.LoadString(IDS_PRODUCT_ID_NONE);
m_strLegalWarning.LoadString(IDS_LEGAL_WARNING);
UpdateData(false);
return true;
}