Fixed issue #2495: "Show Reflog" dialog shows empty action for "push" entries
[TortoiseGit.git] / src / TortoiseIDiff / AboutDlg.cpp
blob23b853bf450191d74141f0a5597cc8cfa67d4358
1 // TortoiseIDiff - an image diff viewer in TortoiseSVN
3 // Copyright (C) 2012-2013 - TortoiseSVN
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software Foundation,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #include "stdafx.h"
20 #include "resource.h"
21 #include "AboutDlg.h"
22 #include "registry.h"
23 #include "../version.h"
24 #include <string>
25 #include <Commdlg.h>
28 CAboutDlg::CAboutDlg(HWND hParent)
29 : m_hParent(hParent)
30 , m_hHiddenWnd(0)
34 CAboutDlg::~CAboutDlg(void)
38 LRESULT CAboutDlg::DlgFunc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
40 UNREFERENCED_PARAMETER(lParam);
41 switch (uMsg)
43 case WM_INITDIALOG:
45 InitDialog(hwndDlg, IDI_TORTOISEIDIFF);
46 // initialize the controls
47 TCHAR verbuf[1024] = {0};
48 TCHAR maskbuf[1024] = {0};
49 ::LoadString (hResource, IDS_VERSION, maskbuf, _countof(maskbuf));
50 _stprintf_s(verbuf, maskbuf, TGIT_VERMAJOR, TGIT_VERMINOR, TGIT_VERMICRO, TGIT_VERBUILD);
51 SetDlgItemText(hwndDlg, IDC_ABOUTVERSION, verbuf);
53 return TRUE;
54 case WM_COMMAND:
55 return DoCommand(LOWORD(wParam));
56 default:
57 return FALSE;
61 LRESULT CAboutDlg::DoCommand(int id)
63 switch (id)
65 case IDOK:
66 // fall through
67 case IDCANCEL:
68 EndDialog(*this, id);
69 break;
71 return 1;