Skip to content

Commit

Permalink
Auto Apply when selections made in pulldown menu
Browse files Browse the repository at this point in the history
http://www.avsforum.com/forum/139-display-calibration/2624737-how-do-i-calibrate-2-10-point-whites.html#post48188873
Requested by: bobof
- It is slightly counter-intuitive for them not to un-gray just on changing the state of the drop down.

Enable/Disable combo boxes depending on dE Formula.
On disable, change the selected items in the combo boxes to the correct ones.

Signed-off-by: Arthur Liberman <[email protected]>
  • Loading branch information
arthur-liberman committed Feb 28, 2017
1 parent e7c9e42 commit 33c07e2
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 14 deletions.
20 changes: 18 additions & 2 deletions AdvancedPropPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ void CAdvancedPropPage::DoDataExchange(CDataExchange* pDX)
{
CPropertyPageWithHelp::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAdvancedPropPage)
DDX_Control(pDX, IDC_COMBO_dE_WEIGHT, m_gwWeightEdit);
DDX_Control(pDX, IDC_COMBO_dE_GRAY, m_dEgrayEdit);
DDX_Control(pDX, IDC_COMBO_dE_WEIGHT, m_gwWeightEdit);
DDX_Control(pDX, IDC_COMBO_dE_GRAY, m_dEgrayEdit);
DDX_Control(pDX, IDC_COMBO_dE, m_dEform);
DDX_Check(pDX, IDC_CHECK_CONFIRM, m_bConfirmMeasures);
DDX_CBString(pDX, IDC_LUXMETER_COM_COMBO, m_comPort);
DDX_CBIndex(pDX, IDC_COMBO_dE, m_dE_form);
Expand Down Expand Up @@ -115,6 +116,21 @@ void CAdvancedPropPage::OnSelchangedECombo()
m_isModified=TRUE;
m_bSave = TRUE;
SetModified(TRUE);

if (m_dEform.GetCurSel() == 5)
{
m_dE_gray = 2;
m_dEgrayEdit.EnableWindow(FALSE);
((CComboBox&)m_dEgrayEdit).SetCurSel(m_dE_gray);
gw_Weight = 0;
m_gwWeightEdit.EnableWindow(FALSE);
((CComboBox&)m_gwWeightEdit).SetCurSel(gw_Weight);
}
else
{
m_dEgrayEdit.EnableWindow(TRUE);
m_gwWeightEdit.EnableWindow(TRUE);
}
}

BOOL CAdvancedPropPage::OnApply()
Expand Down
25 changes: 13 additions & 12 deletions AdvancedPropPage.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,19 @@ class CAdvancedPropPage : public CPropertyPageWithHelp

//{{AFX_DATA(CAdvancedPropPage)
enum { IDD = IDD_ADVANCED_PROP_PAGE };
CEdit m_gwWeightEdit;
CEdit m_dEgrayEdit;
BOOL m_bConfirmMeasures;
CString m_comPort;
int m_dE_form;
int m_dE_gray;
int gw_Weight;
BOOL m_bUseOnlyPrimaries;
BOOL m_bUseImperialUnits;
int m_nLuminanceCurveMode;
BOOL m_bPreferLuxmeter;
BOOL doHighlight;
CEdit m_gwWeightEdit;
CEdit m_dEgrayEdit;
CComboBox m_dEform;
BOOL m_bConfirmMeasures;
CString m_comPort;
int m_dE_form;
int m_dE_gray;
int gw_Weight;
BOOL m_bUseOnlyPrimaries;
BOOL m_bUseImperialUnits;
int m_nLuminanceCurveMode;
BOOL m_bPreferLuxmeter;
BOOL doHighlight;
//}}AFX_DATA

virtual UINT GetHelpId ( LPSTR lpszTopic );
Expand Down

0 comments on commit 33c07e2

Please sign in to comment.