📄 valuemsgview.h
字号:
#if !defined(AFX_VALUEMSGVIEW_H__D814B5EE_AF2B_44A5_8421_C3F6DE36A70C__INCLUDED_)
#define AFX_VALUEMSGVIEW_H__D814B5EE_AF2B_44A5_8421_C3F6DE36A70C__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ValueMsgView.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CValueMsgView form view
#ifndef __AFXEXT_H__
#include <afxext.h>
#endif
#include "ServerInfoView.h"
class Item : public CObject
{
public:
Item() : quality(0), hServerHandle(0) {;}
CString name;
COleVariant value;
WORD quality;
FILETIME timestamp;
OPCHANDLE hServerHandle;
};
typedef CTypedPtrList<CObList, Item*> ItemList;
class CValueMsgView : public CFormView
{
protected:
CValueMsgView(); // protected constructor used by dynamic creation
DECLARE_DYNCREATE(CValueMsgView)
// Form Data
public:
//{{AFX_DATA(CValueMsgView)
enum { IDD = IDD_VALUE_VIEW };
CListCtrl m_value;
//}}AFX_DATA
// Attributes
public:
DWORD transactionID; // only used for asynchronous I/O
ItemList m_items;
Item* pCurrentItem; // selected item in view
CServerInfoView *m_pServerView;
// Operations
public:
void InitalListCtrl(void);//初始化列表的标题等。
void AddItem(LPCTSTR, LPCTSTR, VARTYPE);
void DeleteAllItem(void);//删除所有项
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CValueMsgView)
public:
virtual void OnInitialUpdate();
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
//}}AFX_VIRTUAL
// Implementation
protected:
virtual ~CValueMsgView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
// Generated message map functions
//{{AFX_MSG(CValueMsgView)
afx_msg LONG OnOPCDataChange(UINT wParam,LONG lParam);
afx_msg LONG OnOPCWriteError(UINT wParam,LONG lParam);
afx_msg LONG OnOPCShutdown(UINT wParam,LONG lParam);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
afx_msg void OnAddItem();
afx_msg void OnUpdateAddItem(CCmdUI* pCmdUI);
afx_msg void OnItemProperty();
afx_msg void OnUpdateItemProperty(CCmdUI* pCmdUI);
afx_msg void OnItemchangedListInfo(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnWriteToitem();
afx_msg void OnUpdateWriteToitem(CCmdUI* pCmdUI);
afx_msg void OnDeleteItem();
afx_msg void OnUpdateDeleteItem(CCmdUI* pCmdUI);
afx_msg void OnRefresh();
afx_msg void OnUpdateRefresh(CCmdUI* pCmdUI);
afx_msg void OnReadValue();
afx_msg void OnUpdateReadValue(CCmdUI* pCmdUI);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_VALUEMSGVIEW_H__D814B5EE_AF2B_44A5_8421_C3F6DE36A70C__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -