#include "pch.h"
#include "GenericBkMFC.h"
#include "DlgDerived.h"

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

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

	m_pIconsDLL = m_pIcons;
}

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

	DDX_Control(pDX, IDC_BUTTON1, m_btnKeyboard[0]);
	DDX_Control(pDX, IDC_BUTTON2, m_btnKeyboard[1]);
	DDX_Control(pDX, IDC_BUTTON3, m_btnKeyboard[2]);
	DDX_Control(pDX, IDC_BUTTON4, m_btnKeyboard[3]);
}

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

BOOL CDlgDerived::OnInitDialog() 
{
	CDialog::OnInitDialog();

	m_btnKeyboard[0].m_ptImageOrg.x += 4;
	m_btnKeyboard[0].SetIcon(m_pIconsDLL->LoadIcon(DLL_IDI_SET04_OK, 24, 24));
	//m_btnKeyboard[0].DrawBorder(TRUE, FALSE);
	//m_btnKeyboard[0].SetBlueBorder(TRUE, FALSE);
	m_btnKeyboard[0].SetShade(CKeyboardButtonST::SHS_KEYBOARD2, FALSE);
	m_btnKeyboard[0].SetColor(CKeyboardButtonST::KEYST_COLOR_LOW, RGB(0, 128, 0), FALSE);
	m_btnKeyboard[0].SetColor(CKeyboardButtonST::KEYST_COLOR_MID, RGB(165, 255, 165), FALSE);
	m_btnKeyboard[0].SetColor(CKeyboardButtonST::KEYST_COLOR_HI, RGB(128, 255, 128), FALSE);
	m_btnKeyboard[0].SetColor(CKeyboardButtonST::KEYST_COLOR_MIX, RGB(165, 255, 165), FALSE);
	//
	m_btnKeyboard[1].m_ptImageOrg.x += 4;
	m_btnKeyboard[1].SetIcon(m_pIconsDLL->LoadIcon(DLL_IDI_SET04_CANCEL, 24, 24));
	//m_btnKeyboard[1].DrawBorder(TRUE, FALSE);
	//m_btnKeyboard[1].SetBlueBorder(TRUE, FALSE);
	m_btnKeyboard[1].SetShade(CKeyboardButtonST::SHS_KEYBOARD2, FALSE);
	m_btnKeyboard[1].SetColor(CKeyboardButtonST::KEYST_COLOR_LOW, RGB(255, 0, 0), FALSE);
	m_btnKeyboard[1].SetColor(CKeyboardButtonST::KEYST_COLOR_MID, RGB(255, 165, 165), FALSE);
	m_btnKeyboard[1].SetColor(CKeyboardButtonST::KEYST_COLOR_HI, RGB(255, 122, 122), FALSE);
	m_btnKeyboard[1].SetColor(CKeyboardButtonST::KEYST_COLOR_MIX, RGB(255, 165, 165), FALSE);
	//
	m_btnKeyboard[2].m_ptImageOrg.x += 4;
	m_btnKeyboard[2].SetIcon(m_pIconsDLL->LoadIcon(DLL_IDI_SET04_INFO, 24, 24));
	//m_btnKeyboard[2].DrawBorder(TRUE, FALSE);
	//m_btnKeyboard[2].SetBlueBorder(TRUE, FALSE);
	//m_btnKeyboard[2].SetRoundPressed(TRUE, FALSE);
	m_btnKeyboard[2].SetShade(CKeyboardButtonST::SHS_KEYBOARD2, FALSE);
	m_btnKeyboard[2].SetColor(CKeyboardButtonST::KEYST_COLOR_LOW, RGB(95, 95, 0), FALSE);
	m_btnKeyboard[2].SetColor(CKeyboardButtonST::KEYST_COLOR_MID, RGB(209, 209, 0), FALSE);
	m_btnKeyboard[2].SetColor(CKeyboardButtonST::KEYST_COLOR_HI, RGB(255, 255, 0), FALSE);
	m_btnKeyboard[2].SetColor(CKeyboardButtonST::KEYST_COLOR_MIX, RGB(209, 209, 0), FALSE);
	//
	m_btnKeyboard[3].m_ptImageOrg.x += 4;
	m_btnKeyboard[3].SetIcon(m_pIconsDLL->LoadIcon(DLL_IDI_SET04_ABOUT, 24, 24));
	//m_btnKeyboard[3].DrawBorder(TRUE, FALSE);
	//m_btnKeyboard[3].SetBlueBorder(TRUE, FALSE);
	//m_btnKeyboard[3].SetRoundPressed(TRUE, FALSE);
	m_btnKeyboard[3].SetShade(CKeyboardButtonST::SHS_KEYBOARD2, FALSE);

	return TRUE;
} // End of OnInitDialog

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

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