DlgBlueToothExc.h
上传用户:shmeyee
上传日期:2015-06-28
资源大小:108k
文件大小:2k
源码类别:

通讯编程

开发平台:

Visual C++

  1. // DlgBlueToothExc.h : header file
  2. //
  3. #pragma once
  4. #include "BlueTooth.h"
  5. #include "HwCOM.h"
  6. // CDlgBlueToothExc dialog
  7. class CDlgBlueToothExc : public CDialog
  8. {
  9. // Construction
  10. public:
  11. CDlgBlueToothExc(CWnd* pParent = NULL); // standard constructor
  12. // Dialog Data
  13. enum { IDD = IDD_DLGBLUETOOTHMAIN };
  14. protected:
  15. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  16. // Implementation
  17. protected:
  18. HICON m_hIcon;
  19. // Generated message map functions
  20. virtual BOOL OnInitDialog();
  21. afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
  22. afx_msg void OnPaint();
  23. afx_msg HCURSOR OnQueryDragIcon();
  24. DECLARE_MESSAGE_MAP()
  25. public:
  26. CBlueTooth m_BlueTooth;
  27. public:
  28. afx_msg void OnBnClickedButtonScanbluetoothdevice();
  29. public:
  30. afx_msg void OnLbnDblclkListNearbybthdev();
  31. public:
  32. afx_msg void OnBnClickedButtonTest();
  33. public:
  34. afx_msg void OnBnClickedButtonEnumerate();
  35. public:
  36. afx_msg void OnBnClickedButtonRequestauthenticate();
  37. public:
  38. BOOL GetCur_LocalRadioInfo(t_LocalRadioInfo& LocalRadioInfo);
  39. public:
  40. int GetListCurSel(UINT nID, LPCTSTR lpszMsg);
  41. public:
  42. afx_msg void OnDestroy();
  43. CHwCOM *m_pHwCOM;
  44. public:
  45. void DeleteCOMObject(void);
  46. public:
  47. afx_msg void OnBnClickedButtonConnect();
  48. HANDLE m_hEvtEndThread;
  49. HANDLE m_hEvtSendDataReq;
  50. DWORD m_dwThreadID;
  51. HANDLE m_hThread;
  52. public:
  53. void ThreadProc_COM(void);
  54. public:
  55. void ExitCOMThread(void);
  56. public:
  57. afx_msg void OnBnClickedButtonDisconnect();
  58. public:
  59. void ReadDataAndDisplay(void);
  60. public:
  61. afx_msg void OnBnClickedButtonSend();
  62. BYTE m_DataForSending[MAX_COM_BUFSIZE];
  63. int m_nBytesForSending;
  64. CCriticalSection m_CSFor_DataForSending;
  65. BOOL m_bNoteBeCleared;
  66. public:
  67. afx_msg void OnBnClickedButtonClearup();
  68. public:
  69. void CalcAndShowDataLength(UINT nEditID, UINT nStaticID, bool bHex);
  70. public:
  71. afx_msg void OnBnClickedButtonTest1();
  72. public:
  73. afx_msg void OnEnSetfocusSendtext();
  74. public:
  75. afx_msg void OnBnClickedButtonReceive();
  76. public:
  77. BOOL SendData(BYTE* data, int size);
  78. public:
  79. afx_msg void OnBnClickedButtonFinished();
  80. BOOL m_bShowCurve;
  81. private:
  82. void EnableWindow_ConnCOM(bool bEnable);
  83. // afx_msg void OnLbnSelchangeListNearbybthdev();
  84. afx_msg void OnBnClickedCheckReceivedontimer();
  85. afx_msg void OnTimer(UINT_PTR nIDEvent);
  86. };