// SignalGeneratorBlockDialog.cpp : implementation file
//

#include "stdafx.h"
#include "DiagramEng.h"
#include "SignalGeneratorBlockDialog.h"

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

/////////////////////////////////////////////////////////////////////////////
// CSignalGeneratorBlockDialog dialog


CSignalGeneratorBlockDialog::CSignalGeneratorBlockDialog(CWnd* pParent /*=NULL*/)
	: CDialog(CSignalGeneratorBlockDialog::IDD, pParent)
{
	//{{AFX_DATA_INIT(CSignalGeneratorBlockDialog)
	m_strFnType = _T("");
	m_strUnits = _T("");
	m_dAmplitude = 0.0;
	m_dFrequency = 0.0;
	m_dPhase = 0.0;
	//}}AFX_DATA_INIT
}


void CSignalGeneratorBlockDialog::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CSignalGeneratorBlockDialog)
	DDX_CBString(pDX, ID_SIGNALGEN_BLK_DLG_CB_FN, m_strFnType);
	DDX_CBString(pDX, ID_SIGNALGEN_BLK_DLG_CB_UNITS, m_strUnits);
	DDX_Text(pDX, ID_SIGNALGEN_BLK_DLG_EB_AMP, m_dAmplitude);
	DDX_Text(pDX, ID_SIGNALGEN_BLK_DLG_EB_FREQ, m_dFrequency);
	DDX_Text(pDX, ID_SIGNALGEN_BLK_DLG_EB_PHASE, m_dPhase);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CSignalGeneratorBlockDialog, CDialog)
	//{{AFX_MSG_MAP(CSignalGeneratorBlockDialog)
	ON_BN_CLICKED(ID_SIGNALGEN_BLK_DLG_BTN_OK, OnSignalGeneratorBlkDlgBtnOk)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CSignalGeneratorBlockDialog message handlers

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

	//AfxMessageBox("\n CSignalGeneratorBlockDialog::OnSignalGeneratorBlkDlgBtnOk()\n", MB_OK, 0);

	// Update variable values with the Dlg Wnd control values
	UpdateData(TRUE);

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

	// DiagramEng (end)	
}

