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

📄 testview.h

📁 在vc下写的串口通讯程序
💻 H
字号:
// testView.h : interface of the CTestView class
//
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INCLUDES()
#include "mscomm.h"
#include "msdgridctrl.h"
#include "rdc.h"
//}}AFX_INCLUDES

#if !defined(AFX_TESTVIEW_H__2519B82D_C075_44AE_95A3_D14BBD1ED6FC__INCLUDED_)
#define AFX_TESTVIEW_H__2519B82D_C075_44AE_95A3_D14BBD1ED6FC__INCLUDED_

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

class CTestSet;

class CTestView : public CRecordView
{
protected: // create from serialization only
	CTestView();
	DECLARE_DYNCREATE(CTestView)

public:
	//{{AFX_DATA(CTestView)
	enum { IDD = IDD_TEST_FORM };
	CEdit	m_ctrlSavePath;
	CEdit	m_ctrlReceiveData;
	CTestSet* m_pSet;
	CMSComm	m_ctrlcom;
	CString	m_strreceived;
	CString m_test;
	CString ml;
	CMsDgridCtrl	m_dbGrid;
	int count;
	CString	m_strCurPath;
	CRdc	m_Rdc;
	CString	m_ok;
    
	//}}AFX_DATA

// Attributes
public:
	CTestDoc* GetDocument();
	void ReceiveData();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CTestView)
	public:
    
	virtual CRecordset* OnGetRecordset();
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual void OnInitialUpdate(); // called first time after construct
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CTestView();
    virtual BOOL OnMove(UINT nIDMoveCommand);

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

protected:
      
      unsigned int num;
	  int      time_over;
	  COleDateTime  m_Time;
	  int      m_Minute;
     
      static UINT ThreadFunc(LPVOID pParam);      //辅助线程(处理后台工作)
      void addRecordset(void);                    //增加记录
// Generated message map functions
protected:
	//{{AFX_MSG(CTestView)
	afx_msg void OnComm();
	afx_msg void OnCheckAutosave();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnStartReceive();
	DECLARE_EVENTSINK_MAP()
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in testView.cpp
inline CTestDoc* CTestView::GetDocument()
   { return (CTestDoc*)m_pDocument; }
#endif

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

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

#endif // !defined(AFX_TESTVIEW_H__2519B82D_C075_44AE_95A3_D14BBD1ED6FC__INCLUDED_)

⌨️ 快捷键说明

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