// StrValueDlg.cpp : implementation file
//

#include "stdafx.h"
#include "apl_api.h"
#include "StrValueDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CStrValueDlg dialog


CStrValueDlg::CStrValueDlg(CWnd* pParent /*=NULL*/)
	: CResizableDialog(CStrValueDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CStrValueDlg)
	m_val = _T("");
	//}}AFX_DATA_INIT
}


void CStrValueDlg::DoDataExchange(CDataExchange* pDX)
{
	CResizableDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CStrValueDlg)
	DDX_Control(pDX, IDCANCEL, m_cancel_btn);
	DDX_Control(pDX, IDOK, m_ok_btn);
	DDX_Text(pDX, IDC_STR_VAL, m_val);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CStrValueDlg, CResizableDialog)
	//{{AFX_MSG_MAP(CStrValueDlg)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CStrValueDlg message handlers

BOOL CStrValueDlg::OnInitDialog() 
{
	CResizableDialog::OnInitDialog();
	ModifyStyleEx(0, WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE | WS_EX_CONTROLPARENT);   
	ModifyStyle(0, WS_MAXIMIZEBOX);   
	
	// TODO: Add extra initialization here
	AddAnchor(IDOK,BOTTOM_RIGHT);
	AddAnchor(IDCANCEL,BOTTOM_RIGHT);
	AddAnchor(IDC_STR_VAL, TOP_LEFT, BOTTOM_RIGHT);

	m_cancel_btn.SetIcon(GetAplStdIco16(APLSTDICO_CANCEL));
	m_cancel_btn.SetFlat(FALSE);
	m_ok_btn.SetIcon(GetAplStdIco16(APLSTDICO_OK));
	m_ok_btn.SetFlat(FALSE);
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
