About.cpp 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. // About.cpp : implementation file
  2. //
  3. //Main branch
  4. #include "stdafx.h"
  5. #include "cp_main.h"
  6. #include "About.h"
  7. #include "InternetUpdate.h"
  8. #ifdef _DEBUG
  9. #define new DEBUG_NEW
  10. #undef THIS_FILE
  11. static char THIS_FILE[] = __FILE__;
  12. #endif
  13. /////////////////////////////////////////////////////////////////////////////
  14. // CAbout property page
  15. IMPLEMENT_DYNCREATE(CAbout, CPropertyPage)
  16. CAbout::CAbout() : CPropertyPage(CAbout::IDD)
  17. {
  18. m_csTitle = theApp.m_Language.GetString("AboutTitle", "About");
  19. m_psp.pszTitle = m_csTitle;
  20. m_psp.dwFlags |= PSP_USETITLE;
  21. //{{AFX_DATA_INIT(CAbout)
  22. // NOTE: the ClassWizard will add member initialization here
  23. //}}AFX_DATA_INIT
  24. }
  25. CAbout::~CAbout()
  26. {
  27. }
  28. void CAbout::DoDataExchange(CDataExchange* pDX)
  29. {
  30. CPropertyPage::DoDataExchange(pDX);
  31. //{{AFX_DATA_MAP(CAbout)
  32. DDX_Control(pDX, IDC_HYPER_LINK, m_HyperLink);
  33. DDX_Control(pDX, IDC_LIST, m_List);
  34. //}}AFX_DATA_MAP
  35. }
  36. BEGIN_MESSAGE_MAP(CAbout, CPropertyPage)
  37. //{{AFX_MSG_MAP(CAbout)
  38. //}}AFX_MSG_MAP
  39. END_MESSAGE_MAP()
  40. /////////////////////////////////////////////////////////////////////////////
  41. // CAbout message handlers
  42. BOOL CAbout::OnInitDialog()
  43. {
  44. CPropertyPage::OnInitDialog();
  45. m_List.AddString("Ditto");
  46. CInternetUpdate update;
  47. long lRunningVersion = update.GetRunningVersion();
  48. CString cs = update.GetVersionString(lRunningVersion);
  49. CString csText;
  50. csText = " Version " + cs;
  51. m_List.AddString(csText);
  52. cs = CGetSetOptions::GetExeFileName();;
  53. csText = " Exe Path " + cs;
  54. m_List.AddString(csText);
  55. cs = CGetSetOptions::GetDBPath();
  56. csText = " DB Path " + cs;
  57. m_List.AddString(csText);
  58. m_List.AddString("");
  59. m_List.AddString("Credits");
  60. cs = " Authors - Scott Brogden, [email protected]";
  61. m_List.AddString(cs);
  62. cs = " - Kevin Edwards, [email protected]";
  63. m_List.AddString(cs);
  64. CRect rect;
  65. GetClientRect(rect);
  66. rect.bottom -= 30;
  67. m_List.MoveWindow(rect);
  68. rect.top = rect.bottom + 10;
  69. rect.bottom = rect.top + 30;
  70. m_HyperLink.MoveWindow(rect);
  71. m_HyperLink.SetURL(_T("mailto:[email protected]"));
  72. return TRUE; // return TRUE unless you set the focus to a control
  73. // EXCEPTION: OCX Property Pages should return FALSE
  74. }