// direction.cpp : 实现文件
//

#include "stdafx.h"
#include "MFC_TSPL.h"
#include "direction.h"
#include "afxdialogex.h"
#include "tspl_printer_base.h"


// direction 对话框

IMPLEMENT_DYNAMIC(direction, CDialogEx)

direction::direction(CWnd* pParent /*=NULL*/)
	: CDialogEx(direction::IDD, pParent)
{

}

direction::~direction()
{
}

void direction::DoDataExchange(CDataExchange* pDX)
{
	CDialogEx::DoDataExchange(pDX);
	DDX_Control(pDX, IDC_EDIT1, dir);
	dir.SetWindowText(_T("0"));
}


BEGIN_MESSAGE_MAP(direction, CDialogEx)
	ON_BN_CLICKED(IDOK, &direction::OnBnClickedOk)
END_MESSAGE_MAP()


// direction 消息处理程序


void direction::OnBnClickedOk()
{
	// TODO:  在此添加控件通知处理程序代码
	CString Ddir;
	GetDlgItemText(IDC_EDIT1, Ddir);
	if (!(Ddir != ""))
		AfxMessageBox(_T("方向选择不能为空！"));

	DemDirection(hprinter, _ttoi(Ddir));
}
