// DivideBlockDialog.cpp : implementation file
//

#include "stdafx.h"
#include "DiagramEng.h"
#include "DivideBlockDialog.h"

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

/////////////////////////////////////////////////////////////////////////////
// CDivideBlockDialog dialog


CDivideBlockDialog::CDivideBlockDialog(CWnd* pParent /*=NULL*/)
	: CDialog(CDivideBlockDialog::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDivideBlockDialog)
	m_iNDivideInputs = 0;
	m_iNMultiplyInputs = 0;
	m_iMultType = -1;
	//}}AFX_DATA_INIT
}


void CDivideBlockDialog::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDivideBlockDialog)
	DDX_Text(pDX, ID_DIVIDE_BLK_DLG_EB_NDIVIDES, m_iNDivideInputs);
	DDV_MinMaxInt(pDX, m_iNDivideInputs, 0, 1000);
	DDX_Text(pDX, ID_DIVIDE_BLK_DLG_EB_NMULTS, m_iNMultiplyInputs);
	DDV_MinMaxInt(pDX, m_iNMultiplyInputs, 0, 1000);
	DDX_Radio(pDX, ID_DIVIDE_BLK_DLG_RBTN_ELEMENT, m_iMultType);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDivideBlockDialog, CDialog)
	//{{AFX_MSG_MAP(CDivideBlockDialog)
	ON_BN_CLICKED(ID_DIVIDE_BLK_DLG_BTN_OK, OnDivideBlkDlgBtnOk)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDivideBlockDialog message handlers

void CDivideBlockDialog::OnDivideBlkDlgBtnOk() 
{
	// TODO: Add your control notification handler code here
	
	// DiagramEng (start)

	//AfxMessageBox("\n CDivideBlockDialog::OnDivideBlkDlgBtnOk()\n", MB_OK, 0);
	
	// Update variable values with the Dlg Wnd control values
	UpdateData(TRUE);

	// Close the dialog wnd with OnOK()
	OnOK();

	// DiagramEng (end)
}


