// SlideDlg.cpp : implementation file
//

#include "stdafx.h"
#include "mfc gos.h"
#include "SlideDlg.h"
#include <MLR\MLRHeaders.hpp>



/////////////////////////////////////////////////////////////////////////////
// CSlideDlg dialog


CSlideDlg::CSlideDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CSlideDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CSlideDlg)
	m_Num2 = 0;
	m_Num1 = 0;
	m_Num3 = 0;
	//}}AFX_DATA_INIT
}


void CSlideDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CSlideDlg)
	DDX_Control(pDX, IDC_SLIDER3, m_Slide3);
	DDX_Control(pDX, IDC_SLIDER2, m_Slide2);
	DDX_Control(pDX, IDC_SLIDER1, m_Slide1);
	DDX_Text(pDX, IDC_NUM2, m_Num2);
	DDX_Text(pDX, IDC_NUM1, m_Num1);
	DDX_Text(pDX, IDC_NUM3, m_Num3);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CSlideDlg, CDialog)
	//{{AFX_MSG_MAP(CSlideDlg)
	ON_WM_HSCROLL()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CSlideDlg message handlers

void CSlideDlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) 
{
	// TODO: Add your message handler code here and/or call default
	MLR_Water::SetSpecularValues(m_Slide2.GetPos(), m_Slide1.GetPos(), m_Slide3.GetPos()/255.0f);

	m_Num1=m_Slide1.GetPos();
	m_Num2=m_Slide2.GetPos();
	m_Num3=m_Slide3.GetPos();

	UpdateData(FALSE);
	CDialog::OnHScroll(nSBCode, nPos, pScrollBar);
}

BOOL CSlideDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	m_Slide1.SetRange(0,100);
	m_Slide2.SetRange(0,1000);
	m_Slide3.SetRange(0,255);

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
