Optical improvements
[TortoiseGit.git] / src / TortoiseProc / SinglePropSheetDlg.cpp
blob87444fdc9f9bbc504739eda87ce255ffe65f4f61
1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2009,2013 - TortoiseGit
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.
20 // SinglePropSheetDlg.cpp : implementation file
23 #include "stdafx.h"
24 #include "TortoiseProc.h"
25 #include "SinglePropSheetDlg.h"
28 // CSinglePropSheetDlg dialog
29 using namespace TreePropSheet;
31 IMPLEMENT_DYNAMIC(CSinglePropSheetDlg, CTreePropSheet)
33 CSinglePropSheetDlg::CSinglePropSheetDlg(const TCHAR* szCaption, ISettingsPropPage* pThePropPage, CWnd* pParent /*=NULL*/)
34 : CTreePropSheet(szCaption,pParent),// CSinglePropSheetDlg::IDD, pParent),
35 m_pThePropPage(pThePropPage)
37 AddPropPages();
40 CSinglePropSheetDlg::~CSinglePropSheetDlg()
42 RemovePropPages();
45 void CSinglePropSheetDlg::AddPropPages()
47 SetPageIcon(m_pThePropPage, m_pThePropPage->GetIconID());
48 AddPage(m_pThePropPage);
51 void CSinglePropSheetDlg::RemovePropPages()
53 delete m_pThePropPage;
56 void CSinglePropSheetDlg::DoDataExchange(CDataExchange* pDX)
58 CTreePropSheet::DoDataExchange(pDX);
62 BEGIN_MESSAGE_MAP(CSinglePropSheetDlg, CTreePropSheet)
63 END_MESSAGE_MAP()
66 // CSinglePropSheetDlg message handlers
68 BOOL CSinglePropSheetDlg::OnInitDialog()
70 BOOL bReturn = CTreePropSheet::OnInitDialog();
72 // CRect clientRect;
73 // GetClientRect(&clientRect);
74 // clientRect.DeflateRect(10,10,10,10);
75 // m_pThePropPage->Create(m_pThePropPage->m_lpszTemplateName,this);
76 // m_pThePropPage->MoveWindow(clientRect);
79 CenterWindow(CWnd::FromHandle(hWndExplorer));
81 return bReturn;