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

📄 democlientview.h

📁 modbus编程
💻 H
字号:
// DemoClientView.h : interface of the CDemoClientView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_DEMOCLIENTVIEW_H__B4EB02ED_6395_44A0_AAD3_E3287415CF75__INCLUDED_)
#define AFX_DEMOCLIENTVIEW_H__B4EB02ED_6395_44A0_AAD3_E3287415CF75__INCLUDED_

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

class CDemoClientDoc;

class CDemoClientView : public CListView
{
protected: // create from serialization only
	CDemoClientView();
	DECLARE_DYNCREATE(CDemoClientView)

// Attributes
public:
	CDemoClientDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDemoClientView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual void OnInitialUpdate(); // called first time after construct
	//}}AFX_VIRTUAL

// Implementation
public:
	BOOL AddItem(CString strItemName);

	//****** handle of OPC Server ************/
	//we use only one OPC server in this demo app.
	//if you want to connect to more than one OPC server,
	//define a list/array to manage multi connections by yourself.
	HANDLE m_hConnect;	
	
	//******* handle of OPC Group ***********/
	//only one group defined in this demo app.
	//you can add more groups in your app, and manage them with list/array
	HANDLE m_hGroup;
	
	//******* Object Array of OPC items ********/
	CObArray ItemList;		

	//******* Current index of Selected Item of listview ******/
	int m_nSelectedIndex;

	virtual ~CDemoClientView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

	//afx_msg LRESULT OnServerShutdown(UINT wParam, LPARAM	lParam);

// Generated message map functions
protected:
	//{{AFX_MSG(CDemoClientView)
	afx_msg void OnUpdateOpcConnect(CCmdUI* pCmdUI);
	afx_msg void OnUpdateOpcDisconnect(CCmdUI* pCmdUI);
	afx_msg void OnOpcDisconnect();
	afx_msg void OnOpcConnect();
	afx_msg void OnOpcGroupAdd();
	afx_msg void OnOPCGROUPRemove();
	afx_msg void OnOpcItemAdd();
	afx_msg void OnOpcItemRemove();
	afx_msg void OnUpdateOpcGroupAdd(CCmdUI* pCmdUI);
	afx_msg void OnUpdateOPCGROUPRemove(CCmdUI* pCmdUI);
	afx_msg void OnUpdateOpcItemAdd(CCmdUI* pCmdUI);
	afx_msg void OnUpdateOpcItemRemove(CCmdUI* pCmdUI);
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnDestroy();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnItemRead();
	afx_msg void OnItemWrite();
	afx_msg void OnOpcItemActive();
	afx_msg void OnUpdateOpcItemActive(CCmdUI* pCmdUI);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	CImageList* m_pListImageList;
public:
	void Disconnect(void);
};

#ifndef _DEBUG  // debug version in DemoClientView.cpp
inline CDemoClientDoc* CDemoClientView::GetDocument()
   { return (CDemoClientDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

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

#endif // !defined(AFX_DEMOCLIENTVIEW_H__B4EB02ED_6395_44A0_AAD3_E3287415CF75__INCLUDED_)

⌨️ 快捷键说明

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