About.cpp 2.0 KB

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