// CNCDlg.h : ヘッダー ファイル
//

#pragma once
#include "afxwin.h"

#include "CAO.h"

// CCNCDlg ダイアログ
class CCNCDlg : public CDialog
{
// コンストラクション
public:
	CCNCDlg(CWnd* pParent = NULL);	// 標準コンストラクタ

// ダイアログ データ
	enum { IDD = IDD_CNC_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV サポート


// 実装
protected:
	HICON m_hIcon;

	// 生成された、メッセージ割り当て関数
	virtual BOOL OnInitDialog();
	afx_msg void OnDestroy();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnBnClickedButtonInit();
	afx_msg void OnBnClickedButtonConnect();
	afx_msg void OnBnClickedButtonDisconnect();
	//afx_msg void OnBnClickedButtonReadCurang();
	afx_msg void OnBnClickedButtonReadCurpos();
	afx_msg void OnBnClickedButtonReadDummy();
	afx_msg void OnBnClickedButtonStart();
	afx_msg void OnBnClickedButtonStop();
	DECLARE_MESSAGE_MAP()

private:
	void ShowErrorMessage(HRESULT hr);

private:
	ICaoEngine		*m_eng;
	ICaoWorkspaces	*m_wss;
	ICaoWorkspace	*m_ws;

	ICaoController	*m_ctrl;
	ICaoRobot		*m_CNC;
	ICaoTask		*m_tsk;
	//ICaoVariable	*m_varCurAng;
	ICaoVariable	*m_varCurPos;
	ICaoVariable	*m_varDummy;

	CButton btnInit;
	CButton btnConnect;
	CButton btnDisconnect;
	CStatic lblDsp;
	//CButton btnReadCurAng;
	CButton btnReadCurPos;
	CButton btnReadDummy;
	CButton btnStart;
	CButton btnStop;
};
