#include "pch.h"
#include "GenericBkMFC.h"
#include "DlgShadeButtonST.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

#define IDS_WEBADDR		_T("http://www.softechsoftware.it")

CDlgShadeButtonST::CDlgShadeButtonST(CWnd* pParent, CResourceServerST*	m_pIcons)
	: CDialog(CDlgShadeButtonST::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDlgShadeButtonST)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT

	m_pIconsDLL = m_pIcons;
}

void CDlgShadeButtonST::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDlgShadeButtonST)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP

	DDX_Control(pDX, IDC_BTNSHADE1, m_btnButtons[0]);
	DDX_Control(pDX, IDC_BTNSHADE2, m_btnButtons[1]);
	DDX_Control(pDX, IDC_BTNSHADE3, m_btnButtons[2]);
	DDX_Control(pDX, IDC_BTNSHADE4, m_btnButtons[3]);
	DDX_Control(pDX, IDC_BTNSHADE5, m_btnButtons[4]);
	DDX_Control(pDX, IDC_BTNSHADE6, m_btnButtons[5]);
	DDX_Control(pDX, IDC_BTNSHADE7, m_btnButtons[6]);
	DDX_Control(pDX, IDC_BTNSHADE8, m_btnButtons[7]);
	DDX_Control(pDX, IDC_BTNSHADE9, m_btnButtons[8]);
}

BEGIN_MESSAGE_MAP(CDlgShadeButtonST, CDialog)
	//{{AFX_MSG_MAP(CDlgShadeButtonST)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

BOOL CDlgShadeButtonST::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	m_btnButtons[0].SetShade(CShadeButtonST::SHS_METAL);
	m_btnButtons[0].SetIcon(m_pIconsDLL->LoadIcon(DLL_IDI_SET07_OK, 32, 32));
	//
	m_btnButtons[1].SetShade(CShadeButtonST::SHS_HARDBUMP);
	m_btnButtons[1].SetIcon(m_pIconsDLL->LoadIcon(DLL_IDI_SET07_HELP, 32, 32));
	m_btnButtons[1].SetAlign(CButtonST::ST_ALIGN_VERT);
	//
	m_btnButtons[2].SetShade(CShadeButtonST::SHS_SOFTBUMP);
	m_btnButtons[2].SetIcon(m_pIconsDLL->LoadIcon(DLL_IDI_SET07_FIND, 32, 32));
	//
	m_btnButtons[3].SetShade(CShadeButtonST::SHS_NOISE, 33);
	m_btnButtons[3].SetIcon(m_pIconsDLL->LoadIcon(DLL_IDI_SET07_SAVE, 32, 32));
	m_btnButtons[3].SetAlign(CButtonST::ST_ALIGN_VERT);
	//
	m_btnButtons[4].SetShade(CShadeButtonST::SHS_VBUMP,8,20,5,RGB(55,55,255));
	m_btnButtons[4].SetIcon(m_pIconsDLL->LoadIcon(DLL_IDI_SET07_PRINT, 32, 32));
	//
	m_btnButtons[5].SetShade(CShadeButtonST::SHS_HBUMP,8,20,5,RGB(55,55,255));
	m_btnButtons[5].SetIcon(m_pIconsDLL->LoadIcon(DLL_IDI_GENERAL_EARTH02, 32, 32));
	m_btnButtons[5].SetBtnCursor(IDC_HAND2);
	m_btnButtons[5].SetURL(IDS_WEBADDR);
	m_btnButtons[5].SetTooltipText(IDS_WEBADDR);
	//
	m_btnButtons[6].SetShade(CShadeButtonST::SHS_VSHADE,8,20,5,RGB(55,55,255));
	m_btnButtons[6].SetIcon(m_pIconsDLL->LoadIcon(DLL_IDI_SET07_CANCEL, 32, 32));
	m_btnButtons[6].SetAlign(CButtonST::ST_ALIGN_HORIZ_RIGHT);
	//
	m_btnButtons[7].SetShade(CShadeButtonST::SHS_HSHADE,8,20,5,RGB(55,55,255));
	m_btnButtons[7].SetIcon(m_pIconsDLL->LoadIcon(DLL_IDI_SET07_LOCK, 32, 32));
	m_btnButtons[7].DrawFlatFocus(TRUE);
	//
	m_btnButtons[8].SetShade(CShadeButtonST::SHS_DIAGSHADE,8,10,5,RGB(55,255,55));
	m_btnButtons[8].SetIcon(m_pIconsDLL->LoadIcon(DLL_IDI_SET07_INFO, 32, 32));
	m_btnButtons[8].SetColor(CButtonST::BTNST_COLOR_FG_IN, RGB(0, 178, 0));
	m_btnButtons[8].SetColor(CButtonST::BTNST_COLOR_FG_OUT, RGB(0, 128, 0));

	return TRUE;
} // End of OnInitDialog

void CDlgShadeButtonST::OnOK()
{
} // End of OnOK

void CDlgShadeButtonST::OnCancel()
{
} // End of OnCancel
