// CheckOutDlg.cpp : implementation file
//

#include "stdafx.h"
#include "apl_api.h"
#include "CheckOutDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CCheckOutDlg dialog


CCheckOutDlg::CCheckOutDlg(CWnd* pParent /*=NULL*/)
	: CaplTranslateDialog(CCheckOutDlg::IDD, pParent)
{
	m_title= APL_T("Редактирование объекта");
	m_checkout_question= APL_T("Взять объект на редактирование?");
	m_basis=_T("");
	//{{AFX_DATA_INIT(CCheckOutDlg)
	//}}AFX_DATA_INIT
}


void CCheckOutDlg::DoDataExchange(CDataExchange* pDX)
{
	CaplTranslateDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CCheckOutDlg)
	DDX_Control(pDX, IDCANCEL, m_cancel_btn);
	DDX_Control(pDX, IDOK, m_ok_btn);
	DDX_Control(pDX, IDC_QUESTION, m_question_ctrl);
	DDX_Control(pDX, IDC_BASIS, m_basis_ctrl);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CCheckOutDlg, CaplTranslateDialog)
	//{{AFX_MSG_MAP(CCheckOutDlg)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCheckOutDlg message handlers

BOOL CCheckOutDlg::OnInitDialog() 
{
	CaplTranslateDialog::OnInitDialog();
	
	m_cancel_btn.SetIcon(GetAplStdIco16(APLSTDICO_CANCEL));
	m_cancel_btn.SetFlat(FALSE);
	m_ok_btn.SetIcon(GetAplStdIco16(APLSTDICO_OK));
	m_ok_btn.SetFlat(FALSE);
	// TODO: Add extra initialization here
	SetWindowText(m_title);
	m_question_ctrl.SetWindowText(m_checkout_question);
	m_basis_ctrl.SetWindowText(m_basis);
	UpdateData(FALSE);

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

void CCheckOutDlg::OnOK() 
{
	if(!UpdateData()) return;

	m_basis_ctrl.GetWindowText(m_basis);
	CaplTranslateDialog::OnOK();
}
