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

📄 robotdoc.h

📁 VC++视频开发实例集锦(包括“远程视频监控”"语音识别系统"等13个经典例子)
💻 H
字号:
// robotDoc.h : interface of the CRobotDoc class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_ROBOTDOC_H__F8E893A3_7C74_499B_A838_EEDFDD06F55C__INCLUDED_)
#define AFX_ROBOTDOC_H__F8E893A3_7C74_499B_A838_EEDFDD06F55C__INCLUDED_

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


class CRobotDoc : public CDocument
{
protected: // create from serialization only
	CRobotDoc();
	DECLARE_DYNCREATE(CRobotDoc)

// Attributes
public:
	CWinThread* m_pThread; // 代表辅助线程
	volatile BOOL m_bConnected;
	bool m_bctrlmodal;
	volatile HWND m_hTermWnd;
	volatile HANDLE m_hPostMsgEvent; // 用于WM_COMMNOTIFY消息的事件对象
	OVERLAPPED m_osRead, m_osWrite; // 用于重叠读/写
	volatile HANDLE m_hCom; // 串行口句柄
	int m_nBaud;
	int m_nDataBits;
	int m_nParity;
	CString m_sPort;
	int m_nStopBits;

	BOOL ConfigConnection();
	BOOL OpenConnection();
	void CloseConnection();
	//DWORD ReadComm(char *buf,DWORD dwLength);
	//DWORD WriteComm(char *buf,DWORD dwLength);
	DWORD ReadComm(unsigned char *buf,DWORD dwLength);
	DWORD WriteComm(unsigned char *buf,DWORD dwLength);

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CRobotDoc)
	public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CRobotDoc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:
	UINT m_uCurrentBtn;

// Generated message map functions
public:
	//{{AFX_MSG(CRobotDoc)
	afx_msg void OnSetupcomm();
	afx_msg void OnClosecomm();
	afx_msg void OnOpencomm();
	afx_msg void OnUpdateOpencomm(CCmdUI* pCmdUI);
	afx_msg void OnUpdateClosecomm(CCmdUI* pCmdUI);
	afx_msg void OnAnjianctrl();
	afx_msg void OnUpdateAnjianctrl(CCmdUI* pCmdUI);
	afx_msg void OnVoicectrl();
	afx_msg void OnUpdateVoicectrl(CCmdUI* pCmdUI);
	afx_msg void OnHelp();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

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

#endif // !defined(AFX_ROBOTDOC_H__F8E893A3_7C74_499B_A838_EEDFDD06F55C__INCLUDED_)

⌨️ 快捷键说明

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