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

📄 vcsampledlg.h

📁 modbus通讯
💻 H
字号:
// VcSampleDlg.h : header file
//

#if !defined(AFX_VCSAMPLEDLG_H__E64A4B2A_F493_4C9B_927E_5DA333E1233C__INCLUDED_)
#define AFX_VCSAMPLEDLG_H__E64A4B2A_F493_4C9B_927E_5DA333E1233C__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CVcSampleDlg dialog
#include "ComFile.h"

#define  MAX_NUM 2000
class CVcSampleDlg : public CDialog
{
// Construction
public:
	void DrawImage(int x, int y, CDC *pDC);
    DWORD			m_nFileLen;//jpg文件长度
	IPicture * pPicture;
	char *			m_pJPGBuffer;
	IStream * pStream;
	BOOL LoadJPGFile(const char *pPathname);
	CComFile* m_pComFile;
	CString getAckMsg(int AckID);
	char m_chBitValue[MAX_NUM];
	short m_shWordValue[MAX_NUM];
	char* m_pStartaddr;
	HINSTANCE m_hInst;
	int m_nCommName;
	CVcSampleDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CVcSampleDlg)
	enum { IDD = IDD_VCSAMPLE_DIALOG };
	CButton	m_btnOk;
	CEdit	m_EdMsg;
	CComboBox	m_cmbVerftyCode;
	CComboBox	m_cmbItem;
	CButton	m_btnOperation;
	CEdit	m_edValue;
	CEdit	m_edStartAddr;
	CEdit	m_edNum;
	CComboBox	m_cmbSationNo;
	CButton	m_BtnExit;
	CEdit	m_CmbTimes;
	CEdit	m_EdOverTime;
	CComboBox	m_cmbParityBit;
	CComboBox	m_cmbSTopBit;
	CComboBox	m_cmbDataBit;
	CComboBox	m_cmbBps;
	CComboBox	m_cmbCommName;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CVcSampleDlg)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CVcSampleDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	virtual void OnCancel();
	virtual void OnOK();
	afx_msg void OnExit();
	afx_msg void OnSelchangeCombo2();
	afx_msg void OnRdMultiBit();
	afx_msg void OnRdMultiWord();
	afx_msg void OnWrtOneBit();
	afx_msg void OnWrtMultBit();
	afx_msg void OnWrtOneWord();
	afx_msg void OnWrtMultWord();
	afx_msg void OnVerfityCode();
	afx_msg void OnOpertionBtn();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
public:
	BOOL m_bListen;
	int GetIMaxCount(int nItem);
	int SpiltChar(CString value,int nNum);
	int SpiltString(CString value,int nNum);
	int m_nOperIndex;
	enum OperIndex
	{
		RDMultBit=0,
		RDMultWord,
		WriteOneBit,
		WriteMultBit,
		WriteOneWord,
		WriteMultWord,
		VeriftyCodeID		
	};
	
	void VwCrlComponet(int operationID);
	void OpenCommSuccess(BOOL successFlag=false);
	void AddItem(int operationID);

public:
	afx_msg void OnCbnSelchangeCmbitem();
	afx_msg void OnBnClickedOk();
	afx_msg void OnBnClickedOpertionbtn2();
	afx_msg void OnBnClickedResetbtn();
};

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

#endif // !defined(AFX_VCSAMPLEDLG_H__E64A4B2A_F493_4C9B_927E_5DA333E1233C__INCLUDED_)

⌨️ 快捷键说明

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