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

📄 serialcommdlg.h

📁 一个风扇转速控制的上位机程序
💻 H
字号:
// SerialCommDlg.h : header file
//
//{{AFX_INCLUDES()
#include "mscomm.h"
//}}AFX_INCLUDES

#if !defined(AFX_SERIALCOMMDLG_H__3E8D373D_8B31_4AA6_9D06_539720219F08__INCLUDED_)
#define AFX_SERIALCOMMDLG_H__3E8D373D_8B31_4AA6_9D06_539720219F08__INCLUDED_

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

class CSerialCommDlgAutoProxy;

/////////////////////////////////////////////////////////////////////////////
// CSerialCommDlg dialog

class CSerialCommDlg : public CDialog
{
	DECLARE_DYNAMIC(CSerialCommDlg);
	friend class CSerialCommDlgAutoProxy;

// Construction
public:
	CSerialCommDlg(CWnd* pParent = NULL);	// standard constructor
	virtual ~CSerialCommDlg();

// Dialog Data
	//{{AFX_DATA(CSerialCommDlg)
	enum { IDD = IDD_SERIALCOMM_DIALOG };
	CComboBox	m_ctrl_pid;
	CComboBox	m_ctrl_loop;
	CComboBox	m_ctrlSendMode;
	CButton	m_ctrlOPENclose;
	CButton	m_ctrlSAVE;
	CButton	m_ctrlSEND;
	CButton	m_ctrlCLEARsend;
	CButton	m_ctrlCLEARrecv;
	CButton	m_ctrlCLEARcount;
	CComboBox	m_ctrlStopBits;
	CComboBox	m_ctrlParity;
	CComboBox	m_ctrlDataBits;
	CComboBox	m_ctrlBaud;
	CComboBox	m_ctrlCOMName;
	CEdit	m_Recv_Ctrl;
	CString	m_szSendData;
	CString	m_szRecvData;
	CString	m_szCOMName;
	CString	m_szBaud;
	CString	m_szDataBits;
	CString	m_szParity;
	CString	m_szStopBits;
	CString	m_szStatus;
	int		m_nSendCount;
	CMSComm	m_COM;
	int		m_nRecvCount;
	UINT	m_sv;
	UINT	m_mv;
	UINT	m_ti;
	UINT	m_td;
	UINT	m_kp;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CSerialCommDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL
    struct DataStruct
	{
		float SV;
		float PV;
		float MV;
		float T;
	}WData;
	void WriteDataToFile();
	void MySendOut(CString sendbuff);
	bool reciflag;
// Implementation
protected:
	CSerialCommDlgAutoProxy* m_pAutoProxy;
	HICON m_hIcon;

	BOOL CanExit();

	// Generated message map functions
	//{{AFX_MSG(CSerialCommDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnClose();
	virtual void OnOK();
	virtual void OnCancel();
	afx_msg void OnOpenClose();
	afx_msg void OnOnCommMscomm();
	afx_msg void OnSend();
	afx_msg void OnClearCount();
	afx_msg void OnClearSend();
	afx_msg void OnClearRecv();
	afx_msg void OnSetsv();
	afx_msg void OnReset();
	afx_msg void OnLoopset();
	afx_msg void OnInimv();
	afx_msg void OnAbout();
	afx_msg void OnShowline();
	DECLARE_EVENTSINK_MAP()
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_SERIALCOMMDLG_H__3E8D373D_8B31_4AA6_9D06_539720219F08__INCLUDED_)

⌨️ 快捷键说明

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