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

📄 testpaneldlg.h

📁 上位机与下位机的USB通讯
💻 H
字号:
// TestPanelDlg.h : header file
//

#if !defined(AFX_TESTPANELDLG_H__A6A66517_BBBE_4B75_BA11_67CFC720468B__INCLUDED_)
#define AFX_TESTPANELDLG_H__A6A66517_BBBE_4B75_BA11_67CFC720468B__INCLUDED_

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

// Custom Controls

#include <vector>

//
// buffer to transmit/receive USB data
//
struct USB_iobuf {     
  unsigned char led1, led2;
  unsigned char	port;
  unsigned char analog1, analog2;
  unsigned char not_used[3];
  unsigned char number_of_interrupts[4];
};

typedef	std::vector<CString>	DeviceList;

/////////////////////////////////////////////////////////////////////////////
// CTestPanelDlg dialog

class CTestPanelDlg : public CDialog
{
// Construction
public:
	CTestPanelDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CTestPanelDlg)
	enum { IDD = IDD_TESTPANEL_DIALOG };
	CButton	m_Rdi6;
	CButton	m_Rdi4;
	CButton	m_Rdi2;
	int		m_Xguang;
	int		m_Zguang;
	//}}AFX_DATA

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

// Implementation



protected:
	HICON		m_hIcon;
	HANDLE		m_hUSBDevice;

	BOOL		m_bReadError;
	BOOL		m_bWriteError;

	// USB data buffer
	USB_iobuf	m_IObuffer;

	DeviceList	m_DeviceList;
	int			m_nDeviceNum;
	CString		m_sDeviceName;

	BOOL	GetDeviceList();
	BOOL	SelectDevice();

	// Generated message map functions
	//{{AFX_MSG(CTestPanelDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg HCURSOR OnQueryDragIcon();
	virtual void OnCancel();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnRadio2();
	afx_msg void OnRadio3();
	afx_msg void OnRadio4();
	afx_msg void OnRadio5();
	afx_msg void OnRadio7();
	afx_msg void OnRadio6();
	afx_msg void OnPaint();
    afx_msg void OnOKExit();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_TESTPANELDLG_H__A6A66517_BBBE_4B75_BA11_67CFC720468B__INCLUDED_)

⌨️ 快捷键说明

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