/*********************************************************/
//	NkILSampleSet2Dlg.h
//		Header file of Settings2 dialog class.
//
//	Copyright(c) 2007, Nikon Corporation - All rights reserved.
/*********************************************************/

#pragma once
#include "afxcmn.h"
#include "afxwin.h"
#include "NkILSampleDoc.h"

#define SLIDER_CNT		11				// total number of SliderControl on this dialog

class CNkILSampleSet2Dlg : public CDialog
{
	DECLARE_DYNAMIC(CNkILSampleSet2Dlg)

public:
	CNkILSampleSet2Dlg(CWnd* pParent = NULL);   
	virtual ~CNkILSampleSet2Dlg();

// dialog data
	enum { IDD = IDD_DIALOG_SET2 };

	bool			InitParameter( unsigned long ulGroup, void* pData );
	void			InitSet2DlgStatus();

protected:
	virtual void	DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	afx_msg BOOL	OnInitDialog();
	afx_msg void	OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);	
	afx_msg void	OnApplyParamSettings();			
	afx_msg void	OnApplyCommon();
	afx_msg void	OnApplyColorMode();
	afx_msg void	OnApplyPictureCtrl();

	afx_msg void	OnUpdateEdit( UINT nID );
	afx_msg void	OnKillFocusEdit( UINT nID );
	afx_msg void	OnSelChangeParamSet();
	afx_msg void	OnSelChangeWBCombo();
	afx_msg void	OnSelChangeADLCombo();
	afx_msg void	OnSelChangeColorMode();
	afx_msg void	OnSelChangePictCtrl();
	afx_msg void	OnCheckQuickAdj();
	afx_msg void	OnCheckSharpAuto();
	afx_msg void	OnCheckContrast();
	afx_msg void	OnCheckSaturation();
	
	DECLARE_MESSAGE_MAP()

	void	OnCancel();	
	void	InitComboCtrl( UINT nComboID, UINT nFirstParamID, int nParamNum );	
	void	InitSliderCtrl( UINT nSliderID, UINT nEditID, int nMin, int nMax, int nCurPos );	
	void	InitCommonGroup();
	void	InitColorModeGroup();
	void	InitPicCtrlGroup();
	void	EnableCommonGroup();
	void	EnableColorModeGroup();
	void	EnablePicCtrlGroup();
	void	EnableUnderQuickAdj( bool bQuickAdjust );
	void	EnableHueAndContrast();
	void	EnableWBParam( bool bInit );
	int		GetCtrlDefault( UINT nCtrlID );	
	bool	UpdateEdit( UINT nEditID, int nMinValue, int nMaxValue, int* pnValue = NULL );
	CSliderCtrl* GetSliderOfEdit( UINT nEditID );
	int		GetEditValue( UINT nEditID );
	void	SetEditValue( UINT nEditID, int nEditValue );
	BOOL	PreTranslateMessage(MSG* pMsg);
	void	ChangeDlgDesign();
	void	MoveControl( UINT nID, long lMoveSize );

	CWnd*					m_pParent;		// pointer of owner window
	
	unsigned long			m_ulParamSet;
	bool					m_bApplyPictCtrl;
	bool					m_bIsInitDlg;

	ILSample_CommonGroup	m_StrCommon;
	ILSample_ColorModeGroup	m_StrColor;
	ILSample_WBRange		m_StrWBRange;
	NkIL_PicCtrlParam		m_StrPicture;
};

