⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mfcmovedlg.h

📁 介绍控制器运动的例子
💻 H
字号:
// MFCMoveDlg.h : header file
//

#if !defined(AFX_MFCMOVEDLG_H__5BB65BFD_B6BF_4424_BF01_2952D3528807__INCLUDED_)
#define AFX_MFCMOVEDLG_H__5BB65BFD_B6BF_4424_BF01_2952D3528807__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "ComACRsrvr.h"  // **ADDED** The MFC COM Wrapper for the Communication Sample
class ReadStatus;        // **ADDED** Avoids #include-ing the class header here

/////////////////////////////////////////////////////////////////////////////
// CMFCMoveDlg dialog

class CMFCMoveDlg : public CDialog
{
// Construction
public:
	CMFCMoveDlg(CWnd* pParent = NULL);	// standard constructor
  virtual ~CMFCMoveDlg();         // **ADDED** need a destructor to clean up COM

// Dialog Data
	//{{AFX_DATA(CMFCMoveDlg)
	enum { IDD = IDD_MFCMOVE_DIALOG };
	int		m_Transport;
	BOOL	m_BusType;
	CString	m_lblConnected;
	CString	m_Ver;
	long	m_BPS;
	long	m_CardNbr;
	CString	m_IP;
	long	m_Port;
	int		m_Master;
	int		m_Axis;
	int		m_24vEnable;
	int		m_KAM;
	int		m_Motion;
	int		m_Drive;
	int		m_KAMR;
	long	m_SetPoint;
	long	m_MoveCnt;
	long	m_Position;
	long	m_MoveAmt;
	int		m_MoveMode;
	int		m_CountDirection;
	BOOL	m_StopDEC;
	BOOL	m_MoveABS;
	float	m_VEL;
	float	m_FVEL;
	float	m_ACC;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMFCMoveDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CMFCMoveDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnBtnConnect();
	afx_msg void OnLed24venable();
	afx_msg void OnLedKam();
	afx_msg void OnLedMotion();
	afx_msg void OnLedKamr();
	afx_msg void OnLedDrive();
	afx_msg void OnSelchangeCboAxis();
	afx_msg void OnSelchangeCboMaster();
	afx_msg void OnClrKAM();
	afx_msg void OnMoveStop();
	afx_msg void OnMoveBtn();
	//}}AFX_MSG
  afx_msg LONG OnUpdateStats(UINT,LONG);  // ** ADDED
	DECLARE_MESSAGE_MAP()

// **ADDED** 
private:
  // Interface Pointers
  IControl* m_Cntl;
  IStatus* m_Stat;
  // Connection Point stuff
  ReadStatus * m_workerEvent;
  bool m_StopWork;
  long m_axisMsgId;
  long m_masterMsgId;
// **ADDED** 
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MFCMOVEDLG_H__5BB65BFD_B6BF_4424_BF01_2952D3528807__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -