About.cpp 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. // About.cpp : implementation file
  2. // test test test
  3. //Main branch test
  4. #include "stdafx.h"
  5. #include "cp_main.h"
  6. #include "About.h"
  7. #include "misc.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. auto runningVersion = GetRunningVersion();
  48. CString cs = GetVersionString(runningVersion);
  49. CString csText;
  50. csText = " Version " + cs;
  51. #if _WIN64
  52. csText += " 64bit";
  53. #else
  54. csText += " 32bit";
  55. #endif
  56. m_List.AddString(csText);
  57. const char *SqliteVersion = sqlite3_libversion();
  58. csText = " Sqlite Version ";
  59. csText += SqliteVersion;
  60. m_List.AddString(csText);
  61. cs = CGetSetOptions::GetExeFileName();;
  62. csText = " Exe Path " + cs;
  63. m_List.AddString(csText);
  64. cs = CGetSetOptions::GetDBPath();
  65. csText = " DB Path " + cs;
  66. m_List.AddString(csText);
  67. m_List.AddString(_T(""));
  68. m_List.AddString(_T("Credits"));
  69. cs = " Authors - Scott Brogden, [email protected]";
  70. m_List.AddString(cs);
  71. cs = " - Kevin Edwards, [email protected]";
  72. m_List.AddString(cs);
  73. m_List.AddString(_T(""));
  74. m_List.AddString(_T("Addins"));
  75. //Show what addins are loaded
  76. CStringArray arr;
  77. theApp.m_Addins.AboutScreenText(arr);
  78. INT_PTR count = arr.GetCount();
  79. for(int i = 0; i < count; i++)
  80. {
  81. m_List.AddString(_T(" ") + arr[i]);
  82. }
  83. CRect rect;
  84. GetClientRect(rect);
  85. rect.bottom -= 30;
  86. m_List.MoveWindow(rect);
  87. rect.top = rect.bottom + 10;
  88. rect.bottom = rect.top + 30;
  89. m_HyperLink.MoveWindow(rect);
  90. m_HyperLink.SetURL(_T("mailto:[email protected]"));
  91. rect.top = rect.bottom + 5;
  92. rect.bottom = rect.top + 5;
  93. m_Link.MoveWindow(rect);
  94. m_Link.SetURL(_T("https://ditto-cp.sourceforge.io/"));
  95. return TRUE; // return TRUE unless you set the focus to a control
  96. // EXCEPTION: OCX Property Pages should return FALSE
  97. }