About.cpp 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. //{{AFX_DATA_INIT(CAbout)
  19. // NOTE: the ClassWizard will add member initialization here
  20. //}}AFX_DATA_INIT
  21. }
  22. CAbout::~CAbout()
  23. {
  24. }
  25. void CAbout::DoDataExchange(CDataExchange* pDX)
  26. {
  27. CPropertyPage::DoDataExchange(pDX);
  28. //{{AFX_DATA_MAP(CAbout)
  29. DDX_Control(pDX, IDC_HYPER_LINK, m_HyperLink);
  30. DDX_Control(pDX, IDC_LIST, m_List);
  31. //}}AFX_DATA_MAP
  32. }
  33. BEGIN_MESSAGE_MAP(CAbout, CPropertyPage)
  34. //{{AFX_MSG_MAP(CAbout)
  35. //}}AFX_MSG_MAP
  36. END_MESSAGE_MAP()
  37. /////////////////////////////////////////////////////////////////////////////
  38. // CAbout message handlers
  39. BOOL CAbout::OnInitDialog()
  40. {
  41. CPropertyPage::OnInitDialog();
  42. m_List.AddString("Ditto");
  43. CInternetUpdate update;
  44. long lRunningVersion = update.GetRunningVersion();
  45. CString cs = update.GetVersionString(lRunningVersion);
  46. CString csText;
  47. csText = " Version " + cs;
  48. m_List.AddString(csText);
  49. cs = CGetSetOptions::GetExeFileName();;
  50. csText = " Exe Path " + cs;
  51. m_List.AddString(csText);
  52. cs = CGetSetOptions::GetDBPath();
  53. csText = " DB Path " + cs;
  54. m_List.AddString(csText);
  55. m_List.AddString("");
  56. m_List.AddString("Credits");
  57. cs = " Authors - Scott Brogden, [email protected]";
  58. m_List.AddString(cs);
  59. cs = " - Kevin Edwards, [email protected]";
  60. m_List.AddString(cs);
  61. CRect rect;
  62. GetClientRect(rect);
  63. rect.bottom -= 30;
  64. m_List.MoveWindow(rect);
  65. rect.top = rect.bottom + 10;
  66. rect.bottom = rect.top + 30;
  67. m_HyperLink.MoveWindow(rect);
  68. m_HyperLink.SetURL(_T("mailto:[email protected]"));
  69. return TRUE; // return TRUE unless you set the focus to a control
  70. // EXCEPTION: OCX Property Pages should return FALSE
  71. }