Make Scintilla use Direct2D on Vista and later
[TortoiseGit.git] / src / TortoiseIDiff / AboutDlg.cpp
blob90ee41f12738faf159a0e9f21d87c26ff215db52
1 #include "StdAfx.h"
2 #include "Resource.h"
3 #include "AboutDlg.h"
4 #include "Registry.h"
5 #include "..\version.h"
6 #include <string>
7 #include <Commdlg.h>
9 using namespace std;
11 CAboutDlg::CAboutDlg(HWND hParent)
13 m_hParent = hParent;
16 CAboutDlg::~CAboutDlg(void)
20 LRESULT CAboutDlg::DlgFunc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
22 UNREFERENCED_PARAMETER(lParam);
23 switch (uMsg)
25 case WM_INITDIALOG:
27 InitDialog(hwndDlg, IDI_TORTOISEIDIFF);
28 // initialize the controls
29 TCHAR verbuf[1024] = {0};
30 TCHAR maskbuf[1024] = {0};
31 if (!::LoadString (hResource, IDS_VERSION, maskbuf, _countof(maskbuf)))
33 SecureZeroMemory(maskbuf, sizeof(maskbuf));
35 _stprintf_s(verbuf, maskbuf, TGIT_VERMAJOR, TGIT_VERMINOR, TGIT_VERMICRO, TGIT_VERBUILD);
36 SetDlgItemText(hwndDlg, IDC_ABOUTVERSION, verbuf);
38 return TRUE;
39 case WM_COMMAND:
40 return DoCommand(LOWORD(wParam));
41 default:
42 return FALSE;
46 LRESULT CAboutDlg::DoCommand(int id)
48 switch (id)
50 case IDOK:
51 // fall through
52 case IDCANCEL:
53 EndDialog(*this, id);
54 break;
56 return 1;