robotDoc.h
资源名称:VC++视频传输.rar [点击查看]
上传用户:hxb_1234
上传日期:2010-03-30
资源大小:8328k
文件大小:2k
源码类别:
VC书籍
开发平台:
Visual C++
- // 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_)