About.cpp 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. // About.cpp : implementation file
  2. //
  3. //Main branch test
  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_STATIC_LINK, m_Link);
  33. DDX_Control(pDX, IDC_HYPER_LINK, m_HyperLink);
  34. DDX_Control(pDX, IDC_LIST, m_List);
  35. //}}AFX_DATA_MAP
  36. }
  37. BEGIN_MESSAGE_MAP(CAbout, CPropertyPage)
  38. //{{AFX_MSG_MAP(CAbout)
  39. //}}AFX_MSG_MAP
  40. END_MESSAGE_MAP()
  41. /////////////////////////////////////////////////////////////////////////////
  42. // CAbout message handlers
  43. BOOL CAbout::OnInitDialog()
  44. {
  45. CPropertyPage::OnInitDialog();
  46. m_List.AddString(_T("Ditto"));
  47. CInternetUpdate update;
  48. long lRunningVersion = update.GetRunningVersion();
  49. CString cs = update.GetVersionString(lRunningVersion);
  50. CString csText;
  51. csText = " Version " + cs;
  52. m_List.AddString(csText);
  53. const char *SqliteVersion = sqlite3_libversion();
  54. csText = " Sqlite Version ";
  55. csText += SqliteVersion;
  56. m_List.AddString(csText);
  57. cs = CGetSetOptions::GetExeFileName();;
  58. csText = " Exe Path " + cs;
  59. m_List.AddString(csText);
  60. cs = CGetSetOptions::GetDBPath();
  61. csText = " DB Path " + cs;
  62. m_List.AddString(csText);
  63. m_List.AddString(_T(""));
  64. m_List.AddString(_T("Credits"));
  65. cs = " Authors - Scott Brogden, [email protected]";
  66. m_List.AddString(cs);
  67. cs = " - Kevin Edwards, [email protected]";
  68. m_List.AddString(cs);
  69. m_List.AddString(_T(""));
  70. m_List.AddString(_T("Addins"));
  71. //Show what addins are loaded
  72. CStringArray arr;
  73. theApp.m_Addins.AboutScreenText(arr);
  74. INT_PTR count = arr.GetCount();
  75. for(int i = 0; i < count; i++)
  76. {
  77. m_List.AddString(_T(" ") + arr[i]);
  78. }
  79. CRect rect;
  80. GetClientRect(rect);
  81. rect.bottom -= 30;
  82. m_List.MoveWindow(rect);
  83. rect.top = rect.bottom + 10;
  84. rect.bottom = rect.top + 30;
  85. m_HyperLink.MoveWindow(rect);
  86. m_HyperLink.SetURL(_T("mailto:[email protected]"));
  87. rect.top = rect.bottom + 5;
  88. rect.bottom = rect.top + 5;
  89. m_Link.MoveWindow(rect);
  90. m_Link.SetURL(_T("http://ditto-cp.sourceforge.net"));
  91. return TRUE; // return TRUE unless you set the focus to a control
  92. // EXCEPTION: OCX Property Pages should return FALSE
  93. }