📄 sercomnewview1.h
字号:
// SerComNewView1.h : interface of the CSerComNewView1 class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_SERCOMNEWVIEW1_H__6BE45008_FD46_42C8_B2DB_FDA41B302E35__INCLUDED_)
#define AFX_SERCOMNEWVIEW1_H__6BE45008_FD46_42C8_B2DB_FDA41B302E35__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "SerComNewDoc.h"
#include "SerialPort.h" // Added by ClassView
class CSerComNewView1 : public CFormView
{
protected: // create from serialization only
CSerComNewView1();
DECLARE_DYNCREATE(CSerComNewView1)
public:
//{{AFX_DATA(CSerComNewView1)
enum { IDD = IDD_SERCOMNEW_FORM };
CString m_strSend;
BOOL m_bRepeatSend;
BOOL m_bHexShow;
CString m_strFilePath;
//}}AFX_DATA
// Attributes
public:
CSerComNewDoc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSerComNewView1)
public:
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);
virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
DWORD m_bytesReceived;
int flag;
CFile m_file;
FILE* m_pFile;
CString m_strFlag;
char *m_charPackage;
CString m_strReceive;
CSerialPort m_Ports[4];
virtual ~CSerComNewView1();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
static UINT FileThread(LPVOID pParam);
CWinThread* m_FileThread;
void SendString(CString strSend,int n);
char* DataPackage(char *charTemp,UINT type,int len);
// Generated message map functions
protected:
//{{AFX_MSG(CSerComNewView1)
afx_msg void OnBtnConfigure();
afx_msg void OnBtnSend();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg DWORD OnReceiveData(WPARAM ch,LPARAM port);
afx_msg void OnBtnClear();
afx_msg bool OnBtnFileSend();
afx_msg void OnErrHappen(WPARAM err,LPARAM port);
afx_msg void OnBtnclose();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in SerComNewView1.cpp
inline CSerComNewDoc* CSerComNewView1::GetDocument()
{ return (CSerComNewDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_SERCOMNEWVIEW1_H__6BE45008_FD46_42C8_B2DB_FDA41B302E35__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -