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

📄 imagedisview.h

📁 串口通信显示图像
💻 H
字号:
// ImageDisView.h : interface of the CImageDisView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_IMAGEDISVIEW_H__CE4A2560_742B_4604_9152_C275F66A4218__INCLUDED_)
#define AFX_IMAGEDISVIEW_H__CE4A2560_742B_4604_9152_C275F66A4218__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define id_recive_data 2
#define id_com1_no     0
#define id_com2_no     1
#define id_baud_9600     0
#define id_baud_19200    1
#define id_odd           0
#define id_even          1
#define id_single_frame  0
#define id_multi_frame  1

#include "mscomm.h"
#include "DlgPortSetClass.h"
class CImageDisView : public CView
{
protected: // create from serialization only
	CImageDisView();
	DECLARE_DYNCREATE(CImageDisView)

// Attributes
public:
	CImageDisDoc* GetDocument();
    CMSComm m_MSComm; 
	CString m_strChuankou;
	int		m_nComNum;
	int		m_nBaud;
	int		m_nRowOrColu;
	int		m_nRowNum;
	int		m_nColumnNum;
	int     m_nFrame;
	BYTE*   m_ptrData;
	BYTE*   m_ptrInteData;
	BYTE*   m_ptrDisMemory;
	BITMAPINFOHEADER m_pBmpInf;
	BITMAPFILEHEADER m_pBmpFile;
	bool m_bPortOpen;
	int m_intDataCount;
	int m_nxPos;
	int m_nyPos;
	bool m_bSingleEnd;
	int m_nScount;
	bool m_bIniColorImage;
// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CImageDisView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	virtual void OnUpdateCom(CCmdUI *pCmdUI);
	virtual void OnUpdateComData(CCmdUI *pCmdUI);
	protected:
	//}}AFX_VIRTUAL

// Implementation
public:
	void _savefile();
	int Hex_To_Dec(char ss);
	void _texttoview();
	void _disbmp(bool bPortOpen,CDC *pDC);
	virtual ~CImageDisView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CImageDisView)
	afx_msg void OnOpenPort();
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnComm();
	afx_msg void OnDisImage();
	afx_msg void OnMenuChazhi();
	afx_msg void OnIniImage();
	afx_msg void OnSaveImage();
	afx_msg void OnIniColorImage();
	DECLARE_EVENTSINK_MAP()
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};



#ifndef _DEBUG  // debug version in ImageDisView.cpp
inline CImageDisDoc* CImageDisView::GetDocument()
   { return (CImageDisDoc*)m_pDocument; }
#endif

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

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

#endif // !defined(AFX_IMAGEDISVIEW_H__CE4A2560_742B_4604_9152_C275F66A4218__INCLUDED_)

⌨️ 快捷键说明

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