ChatDlg.h
上传用户:zslianheng
上传日期:2013-04-03
资源大小:946k
文件大小:3k
源码类别:

Linux/Unix编程

开发平台:

Visual C++

  1. /***************************************************************************
  2.  *                                                                         *
  3.  *   This program is free software; you can redistribute it and/or modify  *
  4.  *   it under the terms of the GNU General Public License as published by  *
  5.  *   the Free Software Foundation; either version 2 of the License, or     *
  6.  *   (at your option) any later version.                                   *
  7.  *                                                                         *
  8.  *   copyright            : (C) 2002 by Zhang Yong                         *
  9.  *   email                : z-yong163@163.com                              *
  10.  ***************************************************************************/
  11. #if !defined(AFX_CHATDLG_H__DAFC1114_A397_4CEE_817E_4830C13DF6E8__INCLUDED_)
  12. #define AFX_CHATDLG_H__DAFC1114_A397_4CEE_817E_4830C13DF6E8__INCLUDED_
  13. #if _MSC_VER > 1000
  14. #pragma once
  15. #endif // _MSC_VER > 1000
  16. // ChatDlg.h : header file
  17. //
  18. #include "chatsession.h"
  19. #include "ChatEdit.h"
  20. #include "wave.h"
  21. class TcpSessionBase;
  22. /////////////////////////////////////////////////////////////////////////////
  23. // CChatDlg dialog
  24. class CChatDlg : public CDialog, public ChatSessionListener
  25. {
  26. // Construction
  27. public:
  28. CChatDlg(ChatSession *s, CWnd* pParent = NULL);   // standard constructor
  29. ~CChatDlg();
  30. virtual void onClose();
  31. virtual void onChatText(const char *text);
  32. virtual void onSpeechData(const char *frame, int n);
  33. // Dialog Data
  34. //{{AFX_DATA(CChatDlg)
  35. enum { IDD = IDD_CHAT };
  36. CProgressCtrl m_sendVol;
  37. CProgressCtrl m_recvVol;
  38. CChatEdit m_sendEdit;
  39. CStatic m_contactFace;
  40. CStatic m_myFace;
  41. //}}AFX_DATA
  42. // Overrides
  43. // ClassWizard generated virtual function overrides
  44. //{{AFX_VIRTUAL(CChatDlg)
  45. protected:
  46. virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  47. virtual void PostNcDestroy();
  48. //}}AFX_VIRTUAL
  49. private:
  50. virtual void OnCancel();
  51. BOOL initSpeech();
  52. ChatSession *session;
  53. TcpSessionBase *tcp;
  54. IcqLinkBase *icqLink;
  55. CTime startTime;
  56. WaveIn waveIn;
  57. WaveOut waveOut;
  58. // Implementation
  59. protected:
  60. // Generated message map functions
  61. //{{AFX_MSG(CChatDlg)
  62. virtual BOOL OnInitDialog();
  63. afx_msg void OnTimer(UINT nIDEvent);
  64. afx_msg void OnChangeSendText();
  65. //}}AFX_MSG
  66. afx_msg LRESULT onWaveInData(WPARAM wParam, LPARAM lParam);
  67. afx_msg LRESULT onWaveOutDone(WPARAM wParam, LPARAM lParam);
  68. DECLARE_MESSAGE_MAP()
  69. };
  70. //{{AFX_INSERT_LOCATION}}
  71. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  72. #endif // !defined(AFX_CHATDLG_H__DAFC1114_A397_4CEE_817E_4830C13DF6E8__INCLUDED_)