📄 mainfrm.h
字号:
// MainFrm.h : interface of the CMainFrame class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_MAINFRM_H__853A2D4E_273A_4E4C_A110_111F8668B4EF__INCLUDED_)
#define AFX_MAINFRM_H__853A2D4E_273A_4E4C_A110_111F8668B4EF__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "BtmView.h"
#include "LftView.h"
#include "VsbqView.h"
#include "MySplitterWnd.h"
#include "SerialPort.h"
class CMainFrame : public CFrameWnd
{
protected: // create from serialization only
CMainFrame();
DECLARE_DYNCREATE(CMainFrame)
// Attributes
public:
CMySplitterWnd m_wndSplitter1;
CMySplitterWnd m_wndSplitter2;
BOOL m_bSaveFlage; // 是否有数据需要保存
// Operations
public:
CString m_strTimer; // 显示当前系统时间
bool m_bSendNumFlage; // 串口发送的数据的标志(FALSE表示发送的是字符串,TURE表示发送的是数字)
BYTE m_arryW[1024]; // 写入串口的数据
CSerialPort m_SerialPort; // CSerailPort类对象,用于串口通信
BOOL m_bSerialPortOpened; // 判断串口是否打开的标志(TRUE为打开,FALSE没打开)
CString m_strReceiveMsg; // 通过串口收到的数据
CString m_strSendMsg; // 要通过串口发送的数据
UINT m_hCom; // 当前使用的串口号
UINT m_nBaudRate; // 波特率
char m_parity; // 奇偶校验0--4(不校验、奇校验、偶校验、标号、空格)
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMainFrame)
public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CMainFrame();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected: // control bar embedded members
CStatusBar m_wndStatusBar;
CToolBar m_wndToolBar;
private:
void SaveWave(CString str);
BOOL m_bCommflag;
BOOL saveflage;
// Generated message map functions
protected:
//{{AFX_MSG(CMainFrame)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void SendData(); ////////////////////
afx_msg LONG ReadData(WPARAM ch, LPARAM port); //////////////////////
afx_msg void OnInitPort(); //////////////////////
afx_msg void OnClosePort(); //////////////////////
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnWaveSave();
afx_msg void OnComset();
afx_msg void OnCursorx();
afx_msg void OnCursory();
afx_msg void OnUpdateCursorx(CCmdUI* pCmdUI);
afx_msg void OnUpdateCursory(CCmdUI* pCmdUI);
afx_msg void OnModech1();
afx_msg void OnUpdateModech1(CCmdUI* pCmdUI);
afx_msg void OnModech2();
afx_msg void OnUpdateModech2(CCmdUI* pCmdUI);
afx_msg void OnMODEANDCH();
afx_msg void OnUpdateMODEANDCH(CCmdUI* pCmdUI);
afx_msg void OnMenuitem32781();
afx_msg void OnUpdateMenuitem32781(CCmdUI* pCmdUI);
afx_msg void OnHelp();
afx_msg void OnSpringch1();
afx_msg void OnSpringch2();
afx_msg void OnUpdateSpringch1(CCmdUI* pCmdUI);
afx_msg void OnUpdateSpringch2(CCmdUI* pCmdUI);
afx_msg void OnFileOpen();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MAINFRM_H__853A2D4E_273A_4E4C_A110_111F8668B4EF__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -