2 * @file PropCompareImage.cpp
4 * @brief Implementation of PropCompareImage propertysheet
6 // ID line follows -- this is updated by SVN
10 #include "PropCompareImage.h"
12 #include "OptionsDef.h"
13 #include "OptionsMgr.h"
14 #include "OptionsPanel.h"
19 static char THIS_FILE[] = __FILE__;
24 * @param [in] optionsMgr Pointer to COptionsMgr.
26 PropCompareImage::PropCompareImage(COptionsMgr *optionsMgr)
27 : OptionsPanel(optionsMgr, PropCompareImage::IDD)
31 void PropCompareImage::DoDataExchange(CDataExchange* pDX)
33 CPropertyPage::DoDataExchange(pDX);
34 //{{AFX_DATA_MAP(PropCompareImage)
35 DDX_Text(pDX, IDC_COMPAREIMAGE_PATTERNS, m_sFilePatterns);
40 BEGIN_MESSAGE_MAP(PropCompareImage, CPropertyPage)
41 //{{AFX_MSG_MAP(PropCompareImage)
42 ON_BN_CLICKED(IDC_COMPAREIMAGE_DEFAULTS, OnDefaults)
47 * @brief Reads options values from storage to UI.
48 * Property sheet calls this before displaying GUI to load values
51 void PropCompareImage::ReadOptions()
53 m_sFilePatterns = GetOptionsMgr()->GetString(OPT_CMP_IMG_FILEPATTERNS).c_str();
57 * @brief Writes options values from UI to storage.
58 * Property sheet calls this after dialog is closed with OK button to
59 * store values in member variables.
61 void PropCompareImage::WriteOptions()
63 GetOptionsMgr()->SaveOption(OPT_CMP_IMG_FILEPATTERNS, m_sFilePatterns);
67 * @brief Called before propertysheet is drawn.
69 BOOL PropCompareImage::OnInitDialog()
71 theApp.TranslateDialog(m_hWnd);
72 CPropertyPage::OnInitDialog();
74 return TRUE; // return TRUE unless you set the focus to a control
75 // EXCEPTION: OCX Property Pages should return FALSE
79 * @brief Sets options to defaults
81 void PropCompareImage::OnDefaults()
84 GetOptionsMgr()->GetDefault(OPT_CMP_IMG_FILEPATTERNS, tmp);
85 m_sFilePatterns = tmp.c_str();